Read, write, and execute

In the previous chapter, we discussed the Linux filesystem and the different types with which Linux implements the everything is a file philosophy. However, we did not look at permissions on those files. As you might have guessed, in a multi-user system such as a Linux server, it is not a particularly great idea that users can access files which are owned by other users. Where would the privacy be in that?

The Linux permissions scheme is actually at the heart of the Linux experience, as far as we are concerned. Just as (almost) everything is handled as a file in Linux, all of those files have a distinct set of permissions accompanying them. While exploring the file system in the previous chapter, we limited ourselves to files that were viewable by either everyone or by the currently logged in user. However, there are many files that are only viewable or writable by the root user: often, these are sensitive files such as /etc/shadow (which contains the hashed passwords for all users), or files which are used when starting the system, such as /etc/fstab (which determines which file systems are mounted at boot). If everyone could edit those files, it could result in an unbootable system very quickly!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.37.254