View/Edit #1:filesetaccess file_set_access

Switch to edit mode.

Name(s): filesetaccess file_set_access
1:  "There are two levels of security implemented in the file system."
2:  "'r': Any MOO programmer or WWW user can access it via <object>:fileread(<name>) or a url such as http://files.moo.ca/6/0/5/2/ca.gif"
3:  "'': Only the owner of the object or a wizard has permission to read it."
4:  {file, access} = args
5:  if (!(access in {"r", ""}))
6:    raise(E_INVARG, "Invalid permissions flags.")
7:  elseif (!caller_perms():controls(this))
8:    raise(E_PERM)
9:  endif
10: fs = $file_utils:filespec(this, file)
11: permcode = access ? "644" | "600"
12: if (!this:file_exists(file))
13:   raise(E_INVARG, "File not found", file)
14: endif
15: file_chmod(fs, permcode)
16: "Last modified by Lao-Tzu (#8084) on Tue Aug 24 20:45:50 1999 MDT."
17: "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:04 2002 MDT)."
18: "Last modified by Dax (#789) on Sat Aug 17 14:50:04 2002 MDT."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Slacker (#55)

You are not logged in.

[home | help | who | search | setup | code]