I am adding a user using
useradd -d /home/testuser -m -g usergroup -s /bin/bash testuser
The group 'usergroup' already exists. This command runs fine and the user is created. However, when I try to use it to write to a folder that only has group write permission, it says permission denied. When I look in /etc/group , the user is not in the list of users that belong to 'usergroup'. Is there an extra step I am missing?
Update
forgot to mention that when I add the user to /etc/group, he has the correct access.
id:
uid=524(testuser) gid=524(usergroup) groups=524(usergroup)
ls:
drwxrwxr-x site usergroup /usr/local/test/
usergroup
you needn't be listed for that group in/etc/group
. Please post the output ofid
(when you aretestuser
) and the output ofls -ldZ /path/to/folder
getfacl /usr/local/test/
say?