From f207df5f28afd3b08f5912c62504568044ed427c Mon Sep 17 00:00:00 2001 From: Jan Siwiec <jan.siwiec@vsb.cz> Date: Mon, 12 May 2025 09:32:03 +0200 Subject: [PATCH] Update file standard-file-acl.mdx --- .../docs/storage/acl/standard-file-acl.mdx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/content/docs/storage/acl/standard-file-acl.mdx b/content/docs/storage/acl/standard-file-acl.mdx index 517c4fae..60085fe0 100644 --- a/content/docs/storage/acl/standard-file-acl.mdx +++ b/content/docs/storage/acl/standard-file-acl.mdx @@ -7,7 +7,7 @@ Access control list (ACL) provides an additional, more flexible permission mecha To show permissions, use: -```code +```console $ getfacl <file/dir> ``` @@ -15,13 +15,13 @@ $ getfacl <file/dir> Set all permissions for user john to file named testfile: -```code +```console $ setfacl -m "u:john:rwx" testfile ``` Check permissions: -```code +```console $ getfacl testfile # file: testfile # owner: someone @@ -35,13 +35,13 @@ other::r-- Change permissions for user john: -```code +```console $ setfacl -m "u:john:r-x" testfile ``` Check permissions: -```code +```console $ getfacl testfile # file: testfile # owner: someone @@ -55,13 +55,13 @@ other::r-- Remove all ACL entries: -```code +```console $ setfacl -b testfile ``` Check permissions: -```code +```console $ getfacl testfile # file: testfile # owner: someone @@ -75,7 +75,7 @@ other::r-- You will notice that there is an ACL for a given file because it will exhibit `+` after its Unix permissions in the output of `ls -l`. -```code +```console $ ls -l testfile crw-rw----+ 1 someone someone 14, 4 nov. 9 12:49 testfile ``` @@ -89,43 +89,43 @@ To apply operations to all files and directories recursively, append the `-R/--r To set permissions for a user (user is either the user name or ID): -```code +```console $ setfacl -m "u:user:permissions" <file/dir> ``` To set permissions for a group (group is either the group name or ID): -```code +```console $ setfacl -m "g:group:permissions" <file/dir> ``` To set permissions for others: -```code +```console $ setfacl -m "other:permissions" <file/dir> ``` To allow all newly created files or directories to inherit entries from the parent directory (this will not affect files which will be copied into the directory): -```code +```console $ setfacl -dm "entry" <dir> ``` To remove a specific entry: -```code +```console $ setfacl -x "entry" <file/dir> ``` To remove the default entries: -```code +```console $ setfacl -k <file/dir> ``` To remove all entries (entries of the owner, group and others are retained): -```code +```console $ setfacl -b <file/dir> ``` -- GitLab