Understanding the basics of Linux file permissions is a necessity for Linux and Unix administrators and valuable also for the home user of the Personal Computer (PC). On a Linux system, almost everything is a file; network interfaces are not. The system dictates that each file has an owner and that it might need to be accessed or protected against being accessed by various groups and other users on the system. This is the foundation for Linux security. Files are automatically assigned permissions based on the owner and these permissions can be modified to allow or disallow others from viewing, editing, or executing them.
Viewing and modifying file permissions are not really necessary when working under a Linux distribution developed for single user or home use such as Puppy Linux. If you’re the only one that uses your PC, the security that file permissions offer is probably not of much interest to you. Data can instead be protected by strong passwords and encryption. If for some reason you would like to work with Linux file permissions on such a system, you will probably prefer using a Graphical User Interface (GUI) instead of the command line to view and modify them. The same work by command line is very different. If you have any experience in web development and have uploaded files to the server of the host via File Transfer Protocol (FTP), you’ve probably encountered the chmod command. This command is used to alter a file’s permissions and employs various forms of syntax- mnemonic and octal.
Usually, only Linux and Unix administrators or those who simply prefer command line work choose to open a terminal to view and modify Linux file permissions. The Fedora distribution is excellent for practice because it was developed as a multi-user, highly secure operating system, but it’s also just as suitable for the desktop as Microsoft Windows is. Fortunately for novices, there’s a GUI for the management of permissions. If you click on the screen shot below, you’ll see the permissions of a file named kernelVersions.txt. You can see that the owner is root. I was working as root at the time I created it. The group is also root with read only permission and others have no access. There’s a check in the box for allowing execution of the file as a program and the date the file was last changed.
Remember that root is the highest level of authority on Linux systems so this user can modify permissions without restriction- something a regular user cannot do- but root can give him permission to do this and other operations. To view or modify file permissions, simply right click on the file, highlight and click on properties. A window with tabs across the top will display.
You should see a permissions tab. If you click on that tab, you’ll be able to see and modify permissions. Keep in mind that if you’re not the owner of a file and not root, you’ll be prevented from changing them. Although this can sometimes prove frustrating when working and pressed for time, Linux file permissions are a part of the tight security offered by many Unix-like operating systems.