AboutWelcome to Free Software Daily (FSD). FSD is a hub for news and articles by and for the free and open source community. FSD is a community driven site where members of the community submit and vote for the stories that they think are important and interesting to them. Click the "About" link to read more...
In our “Advanced Console Tricks” series we have already covered subjects like Getting help and Processes management. Now it’s time to understand how the file permissions work. In this article we’re going to cover topics such as the basics of Linux file access rights, useful commands that allow you to manage file permissions, as well as numerical and special access modes.
In Windows they are used for a long time already, but most Linux-users probably don't even know that their system supports them too. Access Control Lists (ACLs) extend the regular permissions we all know with the possibility to give permissions for specific users/groups.
In Navigating the Filesystem I talked about how pathnames work, the difference between /home and home, and using ls to see the contents of a directory. But there are a few more useful tricks you ought to know about finding your way around in the filesystem on your disk.
Going all control-freak on a Samba share and trying to finely slice-and-dice file permissions is the path to madness. Charlie Schluting has some sensible ideas on managing file permissions on your fileserver.
You may be faced with a situation in which you must figure out who has permissions to a file or directory and what those permissions are. This sounds simple enough. It really is not as simple as it may sound, here is an example. You view the contents of the /var/www (/var/www/html in CentOS) directory where your web site content is found and you see a directory that looks like this:
The traditional file permission model, where read, write, and execute permissions are set on each file for the user, group, and others (UGO) has one drawback: It can't be used to define per-user or per-group permissions. For that, you need to employ access control lists (ACL). Eiciel is a graphical tool that integrates with the Nautilus file manager and allows for easy ACL management.