| A Basic Guide To Understanding Permissions In Linux/Unix |
|
Page 1 of 3 Introduction to PermissionsPermissions are a major part of Linux/Unix and can be used to control the system. In essence they allow or disallow a user, or a group of users, to run a program, edit a file, create a new file,create a directory or even move into a directory. This is a very useful function to have, however understanding the way in which they work and how to set them in Linux/Unix can come across to be daunting.Do not panic! this guide will attempt to make the understanding of how these permissions work and how to set them a little easier. In order to allow the change of any permissions in Linux/Unix requires the administrator. The user name for the administrator in Linux or Unix is root . Depending on the system being used, the root user password will vary. Some systems do not allow direct access to this user, so instead to operate as root ,a command has to be issued, in order to do so. N.B. As this guide is more based on using permissions and not understanding how to operator as root , it assumes that this access is readily available. In order to use this guide , the root user is required. If this access is unavailable, then the guide can only be used as a reference. However it is preferred to have this access to have a better understanding of permissions, to have access to the root user please consult your system administrator. Understanding PermissionsFirst of all lets display a list of files/directories to see the current permission settings. To do this type ls -l , on my system I was in the root users home folder and the following appeared:
There are other files in this folder but these are hidden files and are not recommend to alter. The -l tells the ls command to show the permissions, file size, date/time and file/folder name. The most important part to look at here, is the first section :
This setting of permissions means that the user who has created the file, in this case root , is the only user that can read and/or write to this file.
|
