unix - Understanding Linux directory permissions reasoning -
Hello I have 2 questions about Linux directory permissions I can not understand.
I deleted the executable flag from a folder named Folder, after that I can not use the CD on it but I can still do the "ls document" from the root directory and it is still the document directory I list the files in however I refuse to read the missing X-flag this directory?
Then I want to know why the sticky bit on the directories was invented. I've heard that it was used so that users can not delete temporary files by other users. But this IMO violates this rule that we need the rights to this directory to delete files. Why not just give each user a different / TMP / directory rather than presenting exceptions in the rule system? I know what the flag does, but I want to know the logic why it has been done. Perform strong> bits: A bits executed for transparencies for a directory to read
For an example of this difference See this shell talk:
as root:
# foo / -ls Search drwxr-xr-- 3 root root 4096 April 27 12:57 foo / drwxr-xr -x 2 root root 4096 April 27 12:57 foo / bar-rw-r - r - 1 root root 0 April 27 12:57 foo / bar / file
as user:
$ ls foo / bar $ find foo / -ls drwxr-xr-- 3 root route 4096 April 27 12:57 foo / find: foo /: with permission allowed Figure 1: General usage is by other means: Although allowing reading permissions to be deleted by translucency, for instance allowing the web server in ~ / public_html, but- x.Setting Sticky Bit: does not give this default index list. In order to avoid default rules about removal in a directory, it is properly invented so that
/ tmpworks/ tmp/ homeIn comparison, it may be located at a different quantity and / or can be controlled by different quota."Temporary files that are required for the program" while "[they] should not assume that any files or directories in / tmp are kept safe between inventions."
Personally, I think / TMP is a legacy from false days when
vi globals.h & amp; & Amp; InstalledAn installation process was supposed to be presenting programs nowadays should respect$ TMPDIR, which should point to a user-personal system-managed directory, which is minimized on reboot should do. Even standardized functions such as the actual path is not written. Although they seem to be important though, note that the last match is from 1999, so things can change from then onwards.
Comments
Post a Comment