Learn Linux Files Permissions

Posted by Moussan



in this chapter we will cover everything about linux OS files security and permissions and how to control them also you will learn how to allow users to use certain files and how to put restrictions as you like by command line interface







Usage : change permission of file or directory


Usage : list and change attributes of file or directory


Usage : add or remove attribute of file or directory


Usage : prevent file from get removed by any user


Usage : change ownership of any file by set specific user as owner of this file


Usage : change ownership of any file or directory for group type member


Example : setacl -m u:root:rwx + {file}


(-m) => means modify permission

(u) => means user

(root) => refers to user_name

(rwx) => refers to permissions allowed to this file


Usage : Set access control list of file or directory


Usage : returns access control list and permissions of this files


Example : setacl -m m:--r + {file}


(-m) => means modify permission

(m) => means mask (permisson)

(--r) => refers to read-only permission allowed to this file


Usage : Set mask ACL of file or directory


Usage : remove access control list (ACL) of any file or directory


Example : setacl -m d:u:root:rw- + {file}


(-m) => means modify permission

(d) => means default ACL

(u) => means user

(root) => refers to user_name

(rwx) => refers to permissions allowed to this file


Usage : Set access control list of file or directory