UNIX concepts: Difference between revisions
Jump to navigation
Jump to search
(New page: == Sticky bits == * If a directory has the sticky bit in its permissions, this means that all its files can be deleted only by their owners. * The "/tmp" directory has this sticky bit, th...) |
No edit summary |
||
Line 1: | Line 1: | ||
== Sticky bits | = Default group = | ||
* You can change the default active group of your user via the newgrp command. This will open a new shell so is not always convenient. This is why using sudo is sometimes mandatory when you want to run a command as an user with a different group. | |||
= umask = | |||
* The default umask is the default set of permissions that files your current user will create will get. You can set it via the umask command (running this command without arguments gives you the current umask). | |||
* Note that the default umask (as well as the active group) is an environment setting. It is inherited by the parent process that spawned the current process. | |||
= Sticky bits = | |||
* If a directory has the sticky bit in its permissions, this means that all its files can be deleted only by their owners. | * If a directory has the sticky bit in its permissions, this means that all its files can be deleted only by their owners. | ||
* The "/tmp" directory has this sticky bit, this means you cannot delete files in /tmp belonging to another user, even if you are in the same group. | * The "/tmp" directory has this sticky bit, this means you cannot delete files in /tmp belonging to another user, even if you are in the same group. |
Revision as of 18:16, 27 February 2009
Default group
- You can change the default active group of your user via the newgrp command. This will open a new shell so is not always convenient. This is why using sudo is sometimes mandatory when you want to run a command as an user with a different group.
umask
- The default umask is the default set of permissions that files your current user will create will get. You can set it via the umask command (running this command without arguments gives you the current umask).
- Note that the default umask (as well as the active group) is an environment setting. It is inherited by the parent process that spawned the current process.
Sticky bits
- If a directory has the sticky bit in its permissions, this means that all its files can be deleted only by their owners.
- The "/tmp" directory has this sticky bit, this means you cannot delete files in /tmp belonging to another user, even if you are in the same group.