I have created a folder called
/home/projects, to do this I had to use
sudo mkdir /home/projects because it's inside the home folder.
Initially the folder had these permissions:
drwxr-xr-x 4 root root 4096 Dec 29 16:53 projects
I then added two users user1 and user2 to the group developers.
I then changed the owner of the folder to user1 because I read that sometimes if you're not the owner of the folder changes might not work. I did this with:
sudo chown -R user1 /home/projects
I then changed the group with ownership of the folder (while logged in as user1) to developers like this:
sudo chgrp -R developers /home/projects
The output of
ls -la is:
drwxr-xr-x 4 user1 developers 4096 Dec 29 16:45 projects
Both users are part of the group, I checked with:
Despite all of this, user2 still cannot create folders or files inside
/home/projects. The user can enter the folder and view everything inside of it, but nothing else.
The strangest thing about this is that user2 was able to create/upload and delete files and folders inside
/home/projects for about a week, before Ubuntu suddenly started giving him permission denied errors.
If I set user2 as direct owner of the folder, the user is able to do everything, but of course then the other one can't.
What is going on here?
User Zeta suggested I give the group
w access, so now the folder is like this:
drwxrwxr-x 4 user1 developers 4096 Dec 29 16:45 projects
Instead of a permission denied I get this error:
mkdir /home/projects/New directory: received failure with description 'Failure'
Operating system is Gnu/Linux (Ubuntu 18.10)