I have two hard drives mounted under /data

One is /data/Files and the other is /data/Backup

I want to use a group ourgroup to allow five users user1, user2, etc. to all have read-write access.

I made a group and added the users.

I did: sudo chown -R :ourgroup /data
I did: sudo chmod g+s /data

I could not create subfolders in /data/Files

So I did: sudo chmod g+w /data

Still can't make folders. It says permission is denied.

via CLI:
mkdir: cannot create directory ‘/data/Files/NewFolder’: Permission denied

via KDE GUI:

Could not make folder /data/Files/NewFolder.

Any guesses what I'm not understanding or what I'm missing?

I did see something about ACLs, but I would prefer to try it this way first.

~$ ls -ld /data returns drwxrwsr-x 4 root ourgroup

you are viewing a single comment's thread
view the rest of the comments
[–] [S] 2 points 3 days ago (2 children)

thanks for the input

when I’m back at the machine, I’ll try setting the permissions on the drives, too, and see if that’s all I need

I’ll still be curious about why it behaves this way. I’m sure here’s some philosophy behind it. It seemed to me “a parent is a parent” so the permissions should just work like if I was dealing with regular subfolders.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 3 days ago* (1 child)

    There's some special cases with mountpoints. As far as I remember if you mount something, some things come from the mointpoint, not necessaritly the parent directory?! But I wonder what's wrong here. I'm fairly sure you should be able to create directories inside of a directory where you have write access. No matter if it's for another group etc. I can do it on my computer.

    You can also do findmnt /data/Files to see if it's for some reason mounted read-only... And id username should show you if the user is really part of that group.

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 3 points 3 days ago* (last edited 3 days ago)

    I got myself all messed up because I did id in a different shell session than the one I was using to try to make the directory. One shows it is in the group and the other does not.

    I’m guessing a reboot will allow it in the gui, too.

    Yep, that worked.

    cue IT Crowd gif…

  • source
  • parent