Difference between revisions of "Basic Unix file permissions"

From MyWiki
Jump to: navigation, search
 
Line 1: Line 1:
In the Unix world of file permissions users wishing to access a file (or directory) are divided into three categories, '''''Owner''''', '''Group'''''Italic text'' member and '''Other'''''Italic text''.<br>
+
In the Unix world of file permissions users wishing to access a file (or directory) are divided into three categories, '''''Owner''''', '''''Group''''' member and '''''Other'''''.<br>
 
Files and directories have an owner and group associated with them, so if you own the file you get the owners permissions and if one is a member of that particular files group then one gets the groups permissions. Outside these categories people get the Other permissions.<br>
 
Files and directories have an owner and group associated with them, so if you own the file you get the owners permissions and if one is a member of that particular files group then one gets the groups permissions. Outside these categories people get the Other permissions.<br>
 
To see the files permissions, you need to type "ls -l", which for example give the following result <br>
 
To see the files permissions, you need to type "ls -l", which for example give the following result <br>

Latest revision as of 09:13, 8 August 2014

In the Unix world of file permissions users wishing to access a file (or directory) are divided into three categories, Owner, Group member and Other.
Files and directories have an owner and group associated with them, so if you own the file you get the owners permissions and if one is a member of that particular files group then one gets the groups permissions. Outside these categories people get the Other permissions.
To see the files permissions, you need to type "ls -l", which for example give the following result
-rwxr-xr-x 1 george2 george2 315 Jul 30 23:41 RadioSure.desktop
Lets look more closely at the permissions of this particular file
-rwxr-xr-x 1 george2 george2 315 Jul 30 23:41 RadioSure.desktop
- The little dash means that the file is a normal file, as opposed to a directory, for a directory this would be "d"
The following rwx states the Owners permissions, here we have read, write and execute permissions.
Group members get permission of r-x which is read and execute permissions.