user@user-ubuntu:/usr/workspace$ whoami
user
user@user-ubuntu:/usr/workspace$ sudo ls -ltrah .
total 8.0K
drwxr-xr-x 15 root root 4.0K Sep 2 20:10 ..
drwxrwx--- 2 root fooo 4.0K Sep 9 13:28 .
user@user-ubuntu:/usr/workspace$ git clone https://github.com/nkrishnawat/fooo-backend.git
fatal: could not create work tree dir 'fooo-backend': Permission denied
less /etc/groups -tail
nvidia-persistenced:x:137:
citrixlog:x:1001:
fooo:x:1002:user
Asked
Active
Viewed 51 times
1

user204069
- 111
- 1
1 Answers
1
You report that when user
attempts
$ mkdir /usr/workspace/baz
they are greeted
with "Permission denied".
If you run $ id
you will notice that group "fooo"
does not appear in the output.
The contents of /etc/group are consulted at login time,
and will contribute to that id
output.
Log out, log back in, verify the id
output looks good,
and attempt the mkdir
once more, seeing it succeed.

J_H
- 866
/etc/group
file is changed. – Sotto Voce Sep 09 '23 at 21:07su
command prompts for the password of the account whose permissions you are requesting (in this case, theroot
password). Are you entering theroot
password or your own account password?sudo
is the command that prompts you for your account password in order to gain another account's privileges. – Sotto Voce Sep 09 '23 at 21:10