I need to give writing permissions within a folder for all the user in the www-data group.

So far, I tried to ad myUser to the group:

sudo usermod -a -G www-data myUser

Then, I changed the owner and the group of the folder:

sudo chgrp -R www-data shared_folder/
sudo chown -R www-data:www-data shared_folder/

and finally I tried to set the permissions:

sudo chmod g+w -R shared_folder/

This is the result of ls -l for the given folder (and for all its inner files):

drwxrwxr-x  4 www-data    www-data     4096 Feb 17 16:31 shared_folder

Now, I am not able neither to create a new file nor to modify an existing ones in the shared_folder.

What am I missing here?


New user groups are only effective for new logins. A new login can be done by either logging out and then logging in again or by using another mechanism like su oder sudo.

  • That was the reason why.. – Aslan986 Feb 18 '14 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.