Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have created a folder in / that I would like to share between users in a certain user group on my system. After changing ownership of the folder from root to myself and changing the group permissions to "Create and delete files", I logged in as another user in the group and tested the folder. I was able to access the folder and one of its sub-directories, but permission to view/edit a file was denied. I could have changed the permissions on the sub-directory, but based on past experience I would have to do this each time a new file was added so others could view it. Is there any easy way to automatically make any file placed in this folder available to the specified group?

share|improve this question

1 Answer 1

Yes, you can make the directory "sticky" for this, so that when files are created in it, they inherit the directory's permissions:

chmod +t dirname

See the file permissions documentation for more details.

However, when a file is copied into the directory (rather than being created anew there), it will still typically have its original permissions, since copying files generally retains their permissions.

share|improve this answer

Your Answer

 
discard

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.