File Permissions

$ls -l //this is a list command with the -l option list the files information in long mode
this information devided into four parts
– = File type. Most common file types are – A normal file. d = directory, l = sympolic link s = a socket, p = a fifo pipe.
rw- = User permission. we got 3 stages read,write, execute. If something denied the letter´s position is held by a dash.
-rw = group permission
r–= other permission
If we want this permission rwxr-x–x in binary is 111101001 if we treat this as a series of thee groups of octal numbers, the value is 751.
change permission on a specific group
chmod g-r a.txt //which means ¨remove group read permission¨
$chmod +t (folder name) // if a sticky bit is set every user can remove his files on this folder.
A perfect example of a directory that has the sticky bit set is /tmp, that all users can access for temporary files and directories. All users can create files and dirs but users can remove only files that they own.
set-user-id-bit (suid) which makes the programm run as the file owner .
you can set it chmod u+s (filename)
Similarly we got set-group-id (sgid)
chmod g+s (filename)

Source : Hacking Linux Exposed Second Edition ISBN 0-07-222564-5


About ege's press.

Few things. I'm lizard king i can do anything. Let's start this shit. mpla mpla mpla de mas pernei gia polla. (greeklish) System learn greeklish. Learn to use your Keyboard shortcuts makes your life easier.Inside time άλλωστε... εμείς είμαστε ...
This entry was posted in Coding and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s