Thursday, October 7, 2010

What is a sticky bit and how to set a sticky bit on a directory on redhat linux

Users with write permission in a directory can delete the files created by other users. This lets users to destroy the data created by other users.
But with sticky bit set on a directory one can only delete the files created by him.

Setting sticky bit on a directory

By symbolic method:
#chmod o+t directory_path
#chmod o+t /resumes

By numeric method:
If the current permission of the directory is 664, then
#chmod 1664 /resumes

1 on the left end of the permission sets the sticky bit.

Now on the file can be deleted only by the owner of the file.

User administration in redhat linux

User administration in Linux
In Linux there are three type of users.
1. Super user or root user
Super user or the root user is the most powerful user. He is the administrator user.
2. System users
System users are the users created by the softwares or applications. For example if we install Apache it will create a user apache. This kind of users are
known as system users.
3. Normal users
Normal users are the users created by root user. They are normal users like John, Ramu etc. Only the root user has the permission to create or remove a user.