Linux - File and Folder Permission Introduction

preview_player
Показать описание

Linux Permissions are much more simple than what is provided in Windows Active Directory. You have 3 permission types that you can apply to 3 groups. The permissions are Read, Write and Execute which can be applied to the file/folder Owner, the Group Owner and Everyone.

Permission Grouping

Permissions are applied by Owner/ Group Owner/ Everyone
To view permissions and owners use ls -l command in a folder.
Permissions

Execute – Allows script execution
Read – Allows the ability to read
Write – Allows to modify, rename and even delete
Permission Numbers

Execute = 1
Write = 2
Read = 4
Simply add numbers together to get cumulative permissions.

0 = – – –
1 = – – x
2 = – w –
3 = – w x
4 = r – –
5 = r – x
6 = r w –
7 = r w x
Examples

777 = Owner, Members of Group Owner, Everyone have Full Control
764 = Owner has Full Control, Group has Read and Write, Everyone has Read
740 = Owner has Full Control, Group can Read, Everyone can do nothing.
Рекомендации по теме
Комментарии
Автор

Back to the great content Linux 101 for beginners...., good stuff.  Thank you Eli

samben
Автор

Linux, good stuff to discuss about. Thanks Eli!

EndritVj
Автор

Thanks so much for all the videos you put out, Eli! I've been watching a lot lately, not just the tutorial series but also the life-advice type of videos. Great content.

Chili_
Автор

They have Bill Nye the Science Guy👨🏻‍🔬. We have Eli the Computer Guy👨‍💻. Any questions?

KenSherman
Автор

So there is no inheritance in the folder structures, users can delete only their own files that they create in the folder? So if I want some other users to modify the file i need to use groups? Sorry for stupid questions but this is my second week into Linux world 😄

CodeXploit
Автор

What if you just want to use Chirp to program a Ham radio and cannot get permission on ports.

WayneMickel
Автор

If I installed a program using sudo, then this program runs and creates files some time or another. Who owns the files and folder? As for the program itself, can another system user execute the program? For example is www-data, I'd like PHP to execute some program in the background but I'm hammered on how to make it work without going 777 all the way. Please point me to the right resource to learn all these and many thanks in advance.

idselseno
visit shbcf.ru