GOLF(2gg)

๐Ÿ“ฆ version 601.4.41, in ubuntu questing

๐Ÿ’… GOLF(2gg) โ€” permissions

okay bestie, welcome to GOLF(2gg) โœจ this is the permissions page โ€” Golf documentation (general). yes it's the general one. yes it's important. no you can't skip it ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

permissions โ€” Golf documentation (general)


โœจ DESCRIPTION โœจ

okay so. file and directory permissions in Golf are given with standard Linux permissions. that's the vibe. a permission "mode" is typically given as an octal number (such as 0750), where each digit is made of:

  • read โ€” carrying a value of 4
  • write โ€” carrying a value of 2
  • execute/search โ€” carrying a value of 1

so for example 7 means having read, write and execute/search permissions, since 7=4+2+1 ๐Ÿงฎ math ate, honestly.

and then the digits go like this, in order:

  1. the first digit refers to permissions given to user
  2. the second digit refers to those given to the user's group
  3. the third digit refers to those given to everyone

๐ŸŽ€ how Golf actually makes stuff ๐ŸŽ€

files in Golf directories are generally created with 700 privileges, meaning only the user who owns the application can access them and other users โ€” even within the same group โ€” cannot. it's giving exclusive. it's giving main character only ๐Ÿ™ˆ

the same goes for directories created by new-dir by default, unless "mode" specifies differently.

files created by Golf (including open-file and write-file) are created with 600 permissions, meaning only the user who owns the application can access them and other users (even within the same group) cannot. periodt ๐Ÿ’…


๐Ÿฆ‹ checking and changing the vibes ๐Ÿฆ‹

you can use stat-file to obtain the permission mode for a file or directory, and change-mode to set it.

ngl, most of the time, you won't need to do this at all. but if you do?? you should change permission modes carefully and keep in mind the implications for both your application's security and functionality. no cap, this is the part where you actually read the warning ๐Ÿ˜ญ

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

  • General
  • about-golf
  • directories
  • permissions
  • See all documentation

okay that's the whole page, you're so smart for reading it ๐Ÿซถ this was $VERSION, dated $DATE, and it's still GOLF(2gg) โ€” go forth and set your modes responsibly bestie ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from