Next: file commands owner, Previous: file commands tar, Up: file commands [Contents][Index]
Declare the intention to use the programs required to get/set file permissions. Declaring the intention to use a program
The programs are: stat
, chmod
.
Print the access permissions for pathname, in octal format.
The function variant _var
stores the result in the variable _RV, rather than print it;
Result variables.
mbfl_file_get_permissions /bin/ls -| 0755 local PERMS mbfl_file_get_permissions_var PERMS /bin/ls "$_RV" ⇒ 0755
To set permissions one may request the use of sudo
: just request a user before invoking
the following function. Executing a program
Set the access permissions for pathname; mode must be in a form accepted by
chmod
.
Next: file commands owner, Previous: file commands tar, Up: file commands [Contents][Index]