Results 1 to 10 of 19
I read about sticky bits from several sources, and they all say that when the sticky bit is set on a directory, then any files in that directory can only ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-19-2011 #1Just Joined!
- Join Date
- Mar 2011
- Posts
- 67
why doesn't the home directory have the sticky bit set?
I read about sticky bits from several sources, and they all say that when the sticky bit is set on a directory, then any files in that directory can only be deleted by the owner of the file, and not the owner of that folder. My questions are: why is it that the sticky bit is not set on the home directory? Also, why the heck doesn't it do that by default when other people are allowed to write to it? Why on Earth would I want the default?
- 07-19-2011 #2
On my Fedora setup, only I can enter and write files in my /home/userid directory (Fedora uses private groups for users), so there is no need to set the sticky bit. The sticky bit in my opinion is best where many people write files to a shared directory and you only want the owner of the files to be able to delete them.
- 07-19-2011 #3Just Joined!
- Join Date
- Mar 2011
- Posts
- 67
no when I said home directory I meant "/home" which was kind of implied when I said "THE home directory"
- 07-21-2011 #4Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,142
Generally, /home should only be writable by root, not by any user. When you create a new user account, and the user directory is created in /home, the root user that creates the account will change the user/group to the user created, and make the directory only readable/writable by that user. Again, no sticky bit required.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 07-22-2011 #5Just Joined!
- Join Date
- Mar 2011
- Posts
- 67
wouldn't the permissions from the /home directory affect the /home/user directory?
- 07-22-2011 #6
Not necessarily.
The /home directory can have one set of permissions, while it's child directory (/home/user) has another set.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 07-23-2011 #7Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,142
Generally not. /home should be read-only for all but root. Only root can create a new user account, and root has full permissions on /home, so it can create the user directory, and then change the ownership of that directory to the new user. This is part of the fundamental security of Unix and Linux systems, effectively sandboxing users from munging with other users' data without permission, which that other user can grant if appropriate.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 07-28-2011 #8Just Joined!
- Join Date
- Nov 2009
- Location
- Sweden
- Posts
- 35
Why isn't the sticky bit always turned on?
Sure, it is unnecessary in most cases, but it never causes any problems either. Forgetting it on directories where many users have write access has the effect that write protecting files is meaningless, because anyone can delete the file and replace it with a modified copy. I can't think of a single situation where this possibility would be desirable, so why is it even possible to turn off the sticky bit?
- 07-29-2011 #9Just Joined!
- Join Date
- Mar 2011
- Posts
- 67
- 07-29-2011 #10
Let's say that a group has 3 members (Joe, Sam and Sue), all working on a project together.
Perhaps they are working on 3 different aspects of it. You could set the sticky bits on the files for each of them so that they can't be modified by the other members of the group, but can be read by them.
Joe wants to let Sam and Sue see how far he has gotten on his part of the project, so they take a look.
He can feel safe doing so because there is no chance of accidental modification or deletion of the document.
Just one example.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.


Reply With Quote

