h1

Sticky Directory

January 31, 2011

If you would like to ensure that all content created within a directory and also within sub directories will maintain the same group owner as that directory, you need to set one of the ‘sticky bits’ on the directory.

chmod -R g+s dir

Now all content created in directory called dir will have the same group owner as dir. The -R causes all sub directories of dir to also have their group ‘sticky bit’ set.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: