Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I read a lot about that here, but I guess I just can't get it. So here is what I got: I have Ubuntu 10.04 installed and I just created vhost for a domain, let's call it I also created a user "example". So I want to host my domain in /home/example/public_html/ and I added it as path in my vhost config. But the problem is that Apache can't execute .PHP files or it can not access that folder (I'm not sure). I guess it is because of the permissions? Note that user "example" is not added to any specific group. I also want to know what umask should I have for that user, just to be sure that every time when the user upload a file using FTP it will be OK for apache.

Thank you!

share|improve this question

1 Answer 1

up vote 0 down vote accepted

It's possible you don't have PHP installed: apt-get install php5 should tell you whether you need to install it or not.

Unless Apache is locked right down it's unlikely to be permissions because PHP doesn't really execute files.

share|improve this answer
It is installed. I guess the problem is somewhere else. –  John Gold Apr 17 '11 at 5:27
Are you using a specific PHP package for uploading files (like phpbb) ? For security (anything where you let users put files on Servers is insecure) I'd recommend carefully reading the package's installation files to be safe. If you're not using a package then try setting your user's upload directory to chmod 0755 /home/user/upload to test it and then tighten permissions up afterwards and that might help for testing. –  Jonathan Ross Apr 17 '11 at 5:33
I actually fixed it. I was uploading files using FTP but the ftp server was configured with umask 077 rather than 022. Thank you all for the help! –  John Gold Apr 17 '11 at 5:41
No problem, glad it's working. –  Jonathan Ross Apr 17 '11 at 6:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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