1
votes

I have recursively changed ownership of my www folder and everything in it to www-data:www-data. I am using the ubuntu user and have added myself to the www-data group and rebooted the server. I am getting the following error:

mkdir: cannot create directory 'dir_name': Permission denied

I can sudo mkdir, but from research it seems that if I have the right permissions then I should not have to sudo for mkdir. So I clearly lack the permissions, but I am not sure why, if I am in the correct group, as I am.

1
does the group have write permissions ? - MikeWu
it is drwxr-xr-x for www-data:www-data on my www folder where I am making the directory - Tyler
so looks like your group does not have write permissions than. - MikeWu
OH, that would explain it... my friend is saying to do ubuntu:www-data for access. Would it be better to do that or to simply give the group write access? - Tyler
Well, if you change it that way, if user www-data needs to write to your www folder it wont be able to - MikeWu

1 Answers

1
votes

Your group needs to have write permissions to your www directory.

Right now you have rwx for the user than r-x for group and r-x for other.

You need to chmod g+w