Page 1 of 1

How to add permissions to webroot

Posted: Wed Aug 10, 2016 9:37 pm
by angeldrago
Hello everyone, i would like to know how do i add permission outside the web-root where the public_html resides
example below.
MYFOLDER <<< needs all access 0777

Re: How to add permissions to webroot

Posted: Tue Aug 16, 2016 11:06 am
by Elizine

Code: Select all

sudo chown -R :www-data /var/www    # make sure the folder is owned by group www-data
sudo chmod g+w /var/www                  # grant write permission to group www-data on /var/www
sudo adduser NEWUSER www-data        # add NEWUSER to group www-data with write permissions in /var/www
Make sure any new folders you create inside /var/www are also assigned the appropriate permissions.