www-data permissions on /var/www
Rigved Rakshit
r.phate at gmail.com
Tue Nov 13 08:04:20 UTC 2012
>
> My /var/www directory permissions are:
>
> drwxr-xr-x 2 root root 4096 Nov 11 15:34 www/
>
This means that the owner and group of the /var/www/ folder is root. So,
only the user: root and the members of the group: root are allowed to write
to this directory.
> While running the install script for FUDForum, I get this message:
>
> Directory "/var/www/" exists, but the installation script is unable to
> write to the directory. Please grant read/write permissions to the web-
> server user (www-data/www-data)
>
I am assuming here that the FUDForum install script is trying to create a
new file.
> The web-server user is www-data? I tried changing permissions for the /
> var/www folder to add group permissions with chmod g+w /var/www but was
> insuficient.
>
Yes, in Ubuntu, the apache2 web server user is www-data.
Adding write permissions to /var/www/ will not solve your permissions
problem. This is because any new file created will mostly have "-rw-r--r--"
permission. So, this new file can only be written to by the user: root and
the members of the group: root. In other words, www-data will be unable to
write to it.
You can solve this problem by changing the owner and group of the /var/www/
folder to www-data. To do this, use this command:
sudo chown -Rv www-data:www-data /var/www
I hope this helps!
Regards,
Rigved
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20121113/d4782dae/attachment.html>
More information about the ubuntu-users
mailing list