Change mode

Purpose: Change permission mode for a file or directory.

 change-mode <file-or-directory> mode <mode> [ status <status> ]

change-mode will change permission mode for <file-or-directory> to <mode> as specified in "mode" clause. <mode> is a number, typically specified as octal (such as for instance 0750), see permissions. <file-or-directory> is a string that may be an absolute or relative path.

If "status" clause is used, then number <status> is GG_OKAY if succeeded, GG_ERR_EXIST if file or directory does not exist, or GG_ERR_FAILED for other errors (in which case you can use "errno" clause in get-req to find the specific reason why).
Examples
To give read and write privilege to user's group members ("6" means that as a second digit):
 change-mode "myfile" mode 0760

See also
Directories
change-dir  
change-mode  
delete-dir  
new-dir  
Files
change-mode  
close-file  
copy-file  
delete-file  
file-position  
file-storage  
file-uploading  
lock-file  
open-file  
read-file  
read-line  
rename-file  
stat-file  
temporary-file  
uniq-file  
unlock-file  
write-file  
See all
documentation


Copyright (c) 2019-2025 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.