-5

I have a folder created by root and I want to be able to add permissions to a usergroup so they can move around the files etc.

I did the following:

chgrp -R developers testdir

The file owner is now root and the group owner is developers. Why can a user in developers not make changes yet?

DD.
  • 3,254

2 Answers2

8

For standard unix permissions you must always consider, the owner (user/group/other), permission bits, and the umask. The combination of these things are what describe your effective rights, and the permissions of new items.

  • chown/chgrp set the ownership.
  • chmod set the permssions
  • the umask is part of each users environment and depending on how it is set, it will remove permission bits.

So if you want to create a shared folder for a group you usually need to do something like this.

  • Create a new group (projectgrp) and add the users to that group.
  • Change the group ownership of everything under your project folder to projectgrp
  • Change the permissions of all the folders to 2775
  • Change all the files to 0664.
  • Change the umask for all users to 0002

Of course there are other things you can do with ACLs that are a lot more complex for the sysadmin, but can make things easier for the end user.

Zoredache
  • 133,737
3

Because the group doesn't have suitable permissions on the files and directories on and within testdir.

user9517
  • 117,122