0

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 example.com. 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!

John Gold
  • 3
  • 1

1 Answers1

0

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.

Jonathan Ross
  • 2,183
  • 11
  • 14
  • It is installed. I guess the problem is somewhere else. – John Gold Apr 17 '11 at 05: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 05: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 05:41
  • No problem, glad it's working. – Jonathan Ross Apr 17 '11 at 06:14