2

I have a group called homeperms on an Ubuntu system, with a few users:

$ cat /etc/group | grep "homeperms"
homeperms:x:1004:jorik,tim.wijma,vanveenjorik,jorik_c

And I've done $ sudo chgrp -R homeperms /home. But when I try to

md /home/flask.

I get a permission denied error (Happens with any other folder name too).

I don't want to 777 the folders since I'm going to be dealing with web server stuff.

Permissions of home in /

drwxr-xr-x  12 vanveenjorik homeperms  4096 Jul  6 09:06 home

permissions inside /home:

drwxr-xr-x 6 vanveenjorik         homeperms 4096 Jul  3 20:08 19150
drwxr-xr-x 3 codeanywhere-ssh-key homeperms 4096 Jul  6 08:00 codeanywhere-ssh-key
drwxr-xr-x 2 vanveenjorik         homeperms 4096 Jul  6 09:13 downloads
drwxr-xr-x 5 vanveenjorik         homeperms 4096 Jul  4 08:43 jorik
drwxr-xr-x 4 jorik_c              homeperms 4096 Jul  6 08:09 jorik_c
drwxrwxr-x 4 vanveenjorik         homeperms 4096 Jul  3 20:15 mkdir_python
drwxr-xr-x 5 vanveenjorik         homeperms 4096 Jul  4 09:09 tim.wijma
drwxr-xr-x 3 vanveenjorik         homeperms 4096 Jul  3 18:20 ubuntu
drwxr-xr-x 5 vanveenjorik         homeperms 4096 Jul  4 09:27 vanveenjorik
drwxrwxr-x 3 vanveenjorik         homeperms 4096 Jul  3 22:28 venvs

I am trying to do this on the user 'jorik_c' and with sudo this (of course) works flawlessly

Before this gets marked as duplicate, the answer to this question, didn't help.

0

The ls -l shows that your group has only rx permissions on home dir. I think w permission is required for creating anything in the folder.

You can achieve this using the command: $ sudo chmod g+rwx /home

0

By typing the command chgrp -R homeperms /home , You effectively changed the group ownership of /home and everything underneath to homeperms.

BUT, the group still does not have WRITE access on the directory. Per your output:

drwxr-xr-x  12 vanveenjorik homeperms  4096 Jul  6 09:06 home

Remember, file permissions display as: OWNER, GROUP, EVERYONE ELSE
You can fix it quickly by any of the following:

# retaining (rewriting) your existing permissions + toggling the WRITE-ACCESS bit for GROUP
chmod 776 /home

# similar, accomplished the same but simplified
chmod g+w /home

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.