Charles.Forsyth20060303-partialeea662d19 years agoHistory
114 lines · 3.0 KB · Text
RawDownload
.TH FS 3 emu.SH NAMEfs \- host file system interface.SH SYNOPSIS.EXbind #U\fIspec\fP / sys->bind("#U\fIspec\fP", "/", Sys->MAFTER|Sys->MCREATE);.EE.SH DESCRIPTION.I Fsprovides an interface to the host file system when running.IR emu (1).The device is automatically bound to the root of the Inferno namespace when.I emustarts..I Fsmaps filenames from the Inferno namespace to the real host filesystemnamespace. The mapping is determined by the host system directory that.I emuserves (see the description of the.B -roption in.IR emu (1))..PPThe plain name.B #Ualways refers to the root of the Inferno tree within the host file system.An optional.I specstring can select a different tree using conventions peculiar to the host system type.Currently, on Unix and Plan 9, a.I specof.B *(ie,.BR #U* )refers to the root of the host system;on Windows, the.I speccan give a device letter (eg,.BR #Uc: )to refer to the Windows tree on that device..PPWhen there is nothing but.IR root (3)in the name space, the device can only be bound from Limbo using.IR sys-bind (2)as shown above, since there is nothing in the name spaceto support either.IR bind (1)or.IR newns (2).It can later be rebound elsewhere in the name space using.IR bind (1)..PP.I Fsprovides only an approximation to thefile ownership and permissions checking defined in.IR intro (5)and other entries in this manual..IR Emu (1)typically runs as the user that starts it, and that user will own all newly-createdfiles and directories, and that user's host system access rights control accessto any file.Other details are specific to the host system, as given below..SS UnixWhen checking owner, group and other permissions, the intent in Inferno is thateach is tried in turn, in that order.Unix checks just the first that applies, so that if grouppermission disallows access but other allows it, the access is still denied.If.IR emu (1)is run as the super-user, Inferno's rules for ownership and permission checking are enforced by.I fsitself; otherwise, Unix's permission checking prevails..PPOn MacOS X, file names might be case insensitive, depending on file system settings..SS FAT file system (Windows9x and Windows/NT)The values of.B uidand.B gidare.BR Everyone ..PPFiles and directories always have read and execute permission,which cannot be changed.Files without write permission cannot be removed..SS NTFS file system (Windows/NT, 2000, XP)Permissions for read, write and execute operates as described in.IR sys-stat (2)..IR Emu (1)attempts to maintain a limitedbut consistent map between Inferno and NT worlds, specifically between Inferno namesand NT security IDs.Special NT group.B Everyonerepresents `other' for file permissions.The Inferno.B uidis the file owner under NT;the Inferno.B gidreported is the first user in the file's ACLthat is neither the owner nor.BR Everyone ;failing that, the.B gidis the file's owner..SH SOURCE.B /emu/*/devfs.c.br.B /emu/port/devfs-posix.c