13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

204 File Structures Chapter 6Access rule (modified)A file may be accessed under a given name by a subject only if the subject has the appropriate access rights for all the directories in the given name of the file. In particular, i (file 9) may be accessed under the name ˆ/h/i, since that path doesnot use any prohibited files, but it must not be called /a/b/c/h/i because that pathgoes through /a/b. Similarly, m (file 7) may be called /a/m, but it must not becalled ˆ/ˆ/ˆ/m because ˆ/ˆ (directory 3) is inaccessible.2.5 Aliases and indirect filesThe accessibility of a file depends on what the file is called, as we have just seen. All theintermediate files between the working directory (for relative names) or the root (forabsolute names) must be accessible. If a single file has several aliases, they may differ inaccessibility, since the intermediate files may be different. However, after all the intermediatedirectories have been successfully passed, the subject must still have the necessaryprivileges over the file itself.If all directories grant Execute privilege, can a subject be granted access to somefile but denied access to the same file under a different alias? The answer depends onwhether privileges are associated with a file or with a name. If they are associated withthe file, they are not stored in the directory (since several directory entries in severaldirectories may all refer to the same file). In this case, the alias chosen for the file doesnot influence its accessibility. This is the design choice favored by Unix. If privilegesare associated with a name, they might as well be stored in the directory. In this case, thealias chosen can determine accessibility.Indirect files are different. Consider Figure 6.8. Assume that the working1236abd/a/c/ecf/a/c7e45Figure 6.8 A directory structure with indirect files

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!