[LINUX] User , Group , Permission on folder / files


Deskripsi
     Belajar cara membuat user , grouping dan permission pada folder / files (Ubuntu).

How to
USER
-----------------
sudo adduser name_user // create user
sudo userdel name_user // delete user
sudo vim /etc/passwd // show all user profile
sudo passwd name_user // change password


GROUP
----------------
sudo groupadd name_group //cr8
sudo groupdel name_group // delete group
sudo vim /etc/group // show all group profile
sudo deluser name_user group_name // remove group
sudo chown -R user_name fileOrPath // change owner of file
sudo chgrp -R group_name fileOrPath  // change group of file



PERMISSION
------------------
Formatted Permission :
               X1 X2 X3
 example : 7    7   7
x1 : OWNER permission
x2 : Group OWN permission
x3 : EVERYBODY permission

Permission Code :
4 : Read
2 : write
1 : execute
* you can combine by add this value code.

syntax :
sudo chmod 777 file or path -R  // setup permission
* (-R means recursive = include subs files/folder)

list file :
ls -l       // list dir files with metadata
ls -m     // only list

many thanks to eli "the computer guy"

Post a Comment

Harap gunakan bahasa yang baik dan sopan, terima kasih