Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are 2 users


Both users belong to the updaters group as well as other groups.

New directories and files are created in the /updates/ directory.

drwxrwsr-x 8 sftp updaters 4096 Feb 27 16:12 updates

The /updates directory has the sticky bit set to the updaters group.

chmod g+s /updates

In this scenario, sftp can create new directories and files using SFTP. However, when apache tries to create new directories and files, permission is declined.

How can I make it so both users (in the group updaters) can create new directories and files?

share|improve this question
Why would there be a downvote? Could you at least add a comment before just downvoting? Doesn't give any opportunity to learn why this question would be downvoted. – csi Feb 28 '13 at 16:51

The permissions on the updates directory are not quite right for what you are looking to do. In order for the apache user to be able to write new files to the updates directory, they need the write permission. In this case, as apache is a member of the updaters group, just use chmod g+w /updates to allow any user from the updaters group to create new directories and files.

If you'd like the subdirectories to default to the same group assigned to /path/to/updates, (rather than the primary group-id of the folder's creator), use chmod g+s as explained here.

share|improve this answer
Thanks. Updated the /updates directory permissions for group write. New directories created by apache user have apache:updaters ownership. How can I apply this to subdirectories as subdirectories are owned by apache:apache (which is apache's primary group) – csi Mar 1 '13 at 1:24

Use command newgrp to switch to apache's supplementary group updaters.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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