0

If I edit a file using FTP with vsftpd on ubuntu 12.04 LTS... It removes the permissions that allow Apache to access the file...

Currently If I upload a file with FTP, if it is a .php file it will show blank, if it is a .html it will give a page that says "You don't have permission to access /test.html on this server."

However... if I run

sudo chmod a+rx ~
sudo chmod -R a+rx ~/public

It will fix the problem... and all files in public will be accessible to apache.

But every time I edit it with FTP... it goes back to the white page. and I have to rerun the above commands for it to work.

I can't really wrap my head around how to fix this...

  • Where is your Apache folder? – Wilf Feb 27 '14 at 23:17
  • /home/public/ I set it to refer to that directory... so /home/public/index.php is the homepage. – Arian Faurtosh Feb 27 '14 at 23:32
1

So I figured out that all i needed to do was edit /etc/vsftpd.conf and uncomment the following line:

local_umask=022

Then restart the service...

sudo /etc/init.d/vsftpd/ restart

This will fix it now.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.