apache2 www PHP许可

I've installed a new debian 6.0 x64 server with apache2 and php5. I need function like "parse_ini_file", "mkdir", etc. but somehow the permission isn't right for my /var/www folder. Any tips how to set the permission for the /var/www folder?

This is my current permission for the /var/www folder:

drwxr-xr-x  5 root root  4096 Mar  4 17:12 www

You have to change your owner or rights to respond user, you are logged on. For example, root can change john's files, but john, user hierarchically under the root, can't change his files.

  • Change owner of folder/file

    chown user:group /var/www

  • Change rights of folder/file

    chmod [xxx] /var/www

*You can also add -R argument to execute command recursively, it's standing directly after chown and chmod.

**[xxx] usualy used 755, but be carefull about this!

http://en.wikipedia.org/wiki/Chmod

http://linuxcommand.org/lts0070.php