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?

  • 7
    This is all very basic stuff which we would hope that someone working as a professional sysadmin (the target audience for the site) would know. Can I suggest that you speak to your manager about getting some basic linux education - you really need it. – Iain May 17 '12 at 7:19
  • @Iain wow..thats really unhelpful...I cant really afford a professional sysadmin...I'm a software developer running my own startup. – DD. May 17 '12 at 7:33
  • 5
    Iain's advice may seem unhelpful, but it's not really. If you're asking questions like the one above, the skills gap between you and what you're going to need is likely so vast that you'd have to put a huge amount of your time into coming up to speed. If you're the main developer, there are better things to be doing with your time than training to be a mediocre sysadmin. It makes simple business sense to get professional help in a case like this, perhaps on a day-a-week basis. – MadHatter May 17 '12 at 7:37
  • 1
    As you point out, it's not a good idea to do everything as root, and the pain you're feeling now is part of regularising things. Good for you; I only fear there's more such pain to come. – MadHatter May 17 '12 at 7:51
  • 3
    Mother of $DEITY :) This funny – zordor May 17 '12 at 8:08

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.


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

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.