Shylock Hg

My own blog powered by Hugo and Ivy.

Linux Permission


File permission of Linux


Use stat <file> to check the permission of file(dir),its echo look like as -rw-rw-rwx. The first '-' , 'l' , d means regular file, link file and directory. The the 'rwx-' means read, write, execute and no. Finally,the three segments of rwx successively means owner, group and all other users.

Simple of change permission


Detail as bellow:

operation description
+ add permission to specific user
- delete permission to specific user
= set permission to specific user
user description
u owner
g group
o other user
a all user

Simple of change user


chown root \dir [file1 ...] -> change owner to root.


chgrp users file0 [file1 ...] -> change group to users.