[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: File permission confusion [Debian 9.1 with MATE]



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, Jan 01, 2018 at 11:49:01AM -0600, Richard Owlett wrote:

[...]

> It's one of those theory and ability to apply.
> That's why I asked for pointer suitable tutorial.
> [https://lists.debian.org/debian-user/2018/01/msg00008.html]

Roughly in this order:

  https://en.wikipedia.org/wiki/Inode

(or why a "file itself" in unix is very different from the
"directory entry", which is just a kind of file name: an
idea very foreign to people coming from DOS, who can safely
identify a directory entry with a file). Read several times,
until it sinks :-)

Once you can answer questions like

 - what happens if you hardlink a file "foo" to a new name
   "bar", and then delete "foo"?

 - what happens in the above scenario if you instead do
   a softlink?

 - why can't you hardlink across file system boundaries?
   what about a soft link?

 - what happens if you hardlink "foo" to "bar" and then change
   "bar"'s permissions?

Once you have the relationships between file, inode and directory
entry straight in your head, the rest is comparatively easy:

 - https://en.wikipedia.org/wiki/Unix_filesystem
 - https://en.wikipedia.org/wiki/File_system_permissions

And yes, a man page is a manual, not a text book. So it's
as it is supposed to be :-)

A good introductory text (it's a bit old, the implementation
details have changed a lot since, but it'll give you a good
foundation) is Maurice Bach's "The design of the UNIX operating
system":

  https://archive.org/details/DesignOfTheUnixOperatingSystemByMauriceBach

oh, and leave a tip to the great folks at the Internet archive
on your way out.

Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlpKeWkACgkQBcgs9XrR2ka+YQCfb6pd42nuPPZnyFe+6zhTnITd
vJEAnimui7UO4XLbrILugaUhzrvzFIX7
=qqgm
-----END PGP SIGNATURE-----


Reply to: