GOLF(2gg)
β¨ GOLF(2gg) β¨
okay bestie, welcome to the GOLF manual, section 2gg, filed under Development π pull up a chair, we're doing permission bits today and honestly? it's giving main character energy.
π NAME π
change-mode β (directories files)
πΈ PURPOSE πΈ
Change permission mode for a file or directory. that's it, that's the whole job, and she does it flawlessly π
π¦ SYNTAX π¦
change-mode <file-or-directory> mode <mode> [ status <status> ]
β¨ DESCRIPTION β¨
so here's the tea π β change-mode will change permission mode for <file-or-directory> to <mode> as specified in the mode clause.
<mode> is a number, typically specified as octal (such as for instance 0750), see permissions. iykyk, octal is the moment π
<file-or-directory> is a string that may be an absolute or relative path. flexible queen, we love to see it π
If the status clause is used, then number <status> is:
GG_OKAYβ if it succeeded πGG_ERR_EXISTβ if file or directory does not exist πGG_ERR_FAILEDβ for other errors
and if you get that last one? no cap, you can use the errno clause in get-req to find the specific reason why π (that's your detective era, go off)
π EXAMPLES π
To give read and write privilege to user's group members ("6" means that as a second digit) β not me explaining digit math in the year of our lord, but here we are:
change-mode "myfile" mode 0760
slay. that's it. that's the example. periodt π
π SEE ALSO π
πΈ Directories
change-dir change-mode delete-dir directories 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 π«Ά
and that's the whole page, bestie!! this was GOLF(2gg), version $VERSION, dated $DATE β go forth and chmod responsibly, mwah ππ
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms