Aug 5, 2015

0 Add user to www-data with write permission



How to give write permission for /var/www directory.


User permissions on www-data, Folder permission , Grant a user permissions , handling permissions

1. Add user to www-data group
sudo adduser username www-data

2. Add /var/www to www-data (recursive)
sudo chown -R www-data:www-data /var/www

3. Change file and folder permissions on /var/www (recursive)
sudo chmod -R g+rw /var/www

4. User with added permissions must re-login to system.

Example : 

{ sudo adduser some-user www-data ; sudo chown -R www-data:www-data /var/www ; sudo chmod -R g+rw /var/www;}



0 comments :

Post a Comment

Comment: