0

I am running Ubuntu 20.04.1 LTS and having a problem where newly created user, added to group that owns a folder, can't create anything inside that folder. Did read online about this and followed all those instructions so it should work, but it doesn't.

$ sudo adduser bbpipeline
$ sudo usermod -G angular bbpipeline
$ sudo chmod g+rwx /home/angular
$ ls -l /home
drwxrwxr-x+ 7 angular     angular     4096 Jan 26 10:32 angular
$ su bbpipeline
$ mkdir /home/angular/backups
mkdir: cannot create directory ‘/home/angular/backups’: Permission denied
$ id
uid=1005(bbpipeline) gid=1005(bbpipeline) groups=1005(bbpipeline),1004(angular)

I did read that user must re-login and I did that ... with su and then closing terminal and opening it again and relogin. Still no joy. Do not have ACL and would prefer to keep things simple.

EDIT:

$ getfacl /home/angular
getfacl: Removing leading '/' from absolute path names
# file: home/angular
# owner: angular
# group: angular
user::rwx
group::r-x
group:isolated:---
mask::rwx
other::r-x

Started to explore further since @grifferz mentioned that I should check getfacl. It appears that there is ACL installed and that is managing users permissions too. Once I saw that, I executed:

$ getfacl -R /home/angular
$ sudo setfacl -m u:bbpipeline:rwx /home/angular

and now it's working. I can su bbpipeline and I can create new folder with that user inside /home/angular.

1 Answers1

0

The question shows:

$ ls -l /home
drwxrwxr-x+ 7 angular     angular     4096 Jan 26 10:32 angular

The '+' at the end there indicates that /home/angular has POSIX file ACLs on it.

Before the question was edited there was no mention of this, so I suggested that OP do a getfacl /home/angular to see if the ACLs were interfering, and this turned out to be the case.

The question has now been self-answered by OP after exploring the ACLs.

grifferz
  • 808