Find code and diagrams at:

The commands chown and chmod allow you to change permissions and ownership of files and folders, but you also need to know the membership of groups to make sure permissions and ownership is appropriate.

View Group Membership

groups – shows groups you belong to
groups username – shows groups user belongs to
cat /etc/group | less – Allows you to view Group file that has all groups and members
members groupname – Shows members of a specific group
Members is not installed by default in Ubuntu. Install with: sudo apt-get install members
Change Ownership of Files and Folders

chown owner:group file – Changes Account Owner and Group Owner of File
chown :group file – Changes Group Owner of File
chwon -R owner:group folder – Changes Account Owner and Group Owner of Folder and changes contents recursively
Change Permissions

chmod 777 file – Changes permissions of file so that Account Owner can RWX, Group Owner can RWX, and Everyone can RWX
chmod -R 777 folder – Changes permissions of Folder and Contents so that Account Owner can RWX, Group Owner can RWX, and Everyone can RWX
-R is for recursive which means the contents of the folder will be changed also

Nguồn: https://codeigniterbrasil.com

Xem thêm bài viết khác: https://codeigniterbrasil.com/lap-trinh-linux/

18 Comments

script kiddie

May 4, 2020

Thank you , great explanation.

Reply

JJ PRETORIUS

May 4, 2020

THANK YOU after hours of searching for a solution yours worked the first time Thanks a mil

Reply

VIPMOD BRASIL

May 4, 2020

3:40 you're welcome

Reply

Nino Nazghaidze

May 4, 2020

<3 thanks!

Reply

Justin M

May 4, 2020

how do u give different permissions to different types of groups, so instead of working with the group that owns the file, you are changing the permissions of multiple groups that use the file

Reply

Dean Vidafar

May 4, 2020

Did anyone else notice how he says "change"

Reply

Poonam Bharara

May 4, 2020

Thank you so much, Sir, I really learned a lot and enjoyed this video:)

Reply

Spell Caster

May 4, 2020

so putting 000 should lock the folder and files if done : chmod -R 000 Documents/ \ but it shows a pad lock on the folder and files but i can still click on all of them…????

Reply

BABLU KUMAR

May 4, 2020

Hi Eli, could you please also create a video on "special permissions like setuid, setgid and sticky bit" ?
I appreciate your work! Thank you!

Reply

Leon Dennis

May 4, 2020

I wish you could increase the font size or zoom in so I can see better.

Reply

Network Engineer

May 4, 2020

X.500 standard active directory

Reply

Tony Tiger

May 4, 2020

Eli that's not all there is about Linux file permissions. With traditional Linux permissions, you cannot add multiple groups or users to a file or directory. Linux has extended ACL file permissions that will let you do this. setfacl commands.

Reply

parthu janu

May 4, 2020

Finally This channel Monetized .. 🎉🎉🎉🎉🎈

Reply

Graciela Caldera

May 4, 2020

Thank you so much for these classes! I am the only girl on my class and i am glad that I can look smart as the guys on my class.. 🤗😍 thank you so much

Reply

Toast man

May 4, 2020

I love this man no homo

Reply

-

May 4, 2020

I don't know why ls doesn't have an option to view the permissions numerically (eg 755) instead of only as bitfields. 😐

Reply

astr0b0y

May 4, 2020

Great video !! Please could you explain about File System, processes, services, kernel, run level, etc….it would be very interesting!

Reply

Babu Rao Ganpat Rao

May 4, 2020

sir ur linux series videos are really really helpful and full of detail knowledge……….one request sir please make a complete configuration of linux which linux administrator has to do in the organisation or in big MNC's ……….like server configurations–> dns, dhcp, samba, etc

Reply

Leave a Reply