Note that, by default, you must use sudo to change a file’s owner or group.
This section has been moved to: Fstab#Options
Posix ACLs are a way of achieving a finer granularity of permissions than is possible with the standard Unix file permissions. See the full page on ACLs FilePermissionsACLs
. UUID=d027a8eb-e234-1c9f-aef1-43a7dd9a2345 /home ext4 defaults,acl 0 2 .
sudo mount -o remount /home
The commands, setfacl and getfacl, set and read ACLs on files and directories.
mkdir shared_dir chmod 777 shared_dir
setfacl -d -m u:nobody:rwx,g:nogroup:rwx,o::r-x shared_dir
The Eiciel package allows GUI access to ACLs through the Nautilus file manager.
To remove a file you cannot delete use
where filename is the name and path of the file to delete.
Nota bene: Be very careful when using the command rm with the -rf option since -r makes the file removal recursive (meaning it will remove files inside of folders) and -f will force the removal even for files which aren’t writable. To play it safe, please consider typing in the absolute path to the file
sudo rm -rf /path/to/file/filename
to prevent any mishaps that can/will occur. It takes longer to type but you can’t put a price on peace of mind. See the rm man page for details.
The sticky bit applies only to directories, and is typically used on publicly-writeable directories. Within a directory upon which the sticky bit is applied, users are prevented from deleting or renaming any files that they do not personally own.
To add or remove the sticky bit, use chmod with the «t» flag:
The status of the sticky bit is shown in the other execute field, when viewing the long output of ls. «t» or «T» in the other execute field indicates the sticky bit is set, anything else indicates it is not.
Making a public directory:
user@host:/home/user$ mkdir folder user@host:/home/user$ chmod 777 folder user@host:/home/user$ ls -l total 3 drwxrwxrwx 2 user user 4096 Nov 19 20:13 folder
Adding the sticky bit (note the «t» in the other execute field):
user@host:/home/user$ chmod +t folder user@host:/home/user$ ls -l total 3 drwxrwxrwt 2 user user 4096 Nov 19 20:13 folder
FilePermissions (последним исправлял пользователь ti-225-214-154 2013-11-10 12:51:38)
The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details