Linux Sysadmin Basics -- Linux File Permissions

preview_player
Показать описание
How do file permissions work on Linux? How can I make a Linux file readable or executable? This is a basic overview (without diving into Binary notation) of Linux and Unix file permissions. In other words, you'll finally be able to decode everything you see when you type "ls -l".

Рекомендации по теме
Комментарии
Автор

Read=4
Write=2
Xecute=1
It's not that difficult. You just add the ones you want:
4+2+1 = (r+w+x) = 7
4+2 = (r+w) = 6
4+1 = (r+x) = 5
4 = (r) = 4
2+1 = (w+x) = 3
2 = (w) = 2
1 = (x) = 1

VperVendetta
Автор

made it this far and I'm thinking, this guy dedicated all this time to explain Linux without any payoff, thank you so much man! Very helpful videos, cheers! :)

balsabjelogrlic
Автор

Thanks for the video, it was super helpful. The one thing I would add would be an easy way to remember the different chmod values without having to look them up. Each number 0-7 represents an addition of 0 to 3 of the following numbers: 4 represents read, 2 represents write, 1 represents execute. So a 6 means rw- (4+2) and a 2 means -w- and a 0 means --- and so on.


Edit: In retrospect this is just because of binary, rwx = 111 and r-x = 101 and so on. I didn't realize this until the next morning. Perhaps this is why I shouldn't try to learn Linux at midnight lol.

berkelunstad
Автор

chmod notations @ 3;20: (easier to memorize in descending order actually)

0: - - - (no rights at all)
1: - - x
2: - w -
3: - w x
4: r - -
5: r - x
6: r w -
7: r w x

usingvancedplzdontban
Автор

By playing around with chmod, I've found out that you need to have both read and execute privileges in order to view the directory content and file attributes.
Setting the value to 1 (execute only) will lock you out of the directory, preventing you to see its content.
Setting the value to 4 (read only) allows you to see the directory contents but the file attributes aren't accessible.
Cool, lots of new stuff learned today, thanks.

JnDaFraK
Автор

Thank you for these videos. I work in a research group in Computational Fluid Dynamics, we all use Linux and supercomputers but most of us learn just what we need and much less that what could be useful for us. Definitely,  I'll recommend your entire course to new students coming to our lab.

BorrellRicard
Автор

Thank you so much sir !!! I've seen a lot of videos about linux on youtube and yours are the best. You have a an incredible way for making everything so simple and easy to understand.

nadiakateb
Автор

Been enjoying this Linux series! All of this has been really informative and well structured, thank you so much!

classicsagat
Автор

Thanks so much. It's very kind and thoughtful of you to create and update this series. It's quite comprehensive and is a great review for me.

habituallearner
Автор

Loving this series Dave. New to Linux, so this is gold. Thanks!

saltdomeguy
Автор

Your videos really are an eye opener.
Thanks for the effort.

klaraschumann
Автор

Excellent. I have been following your tutorials with a book called: Linux Pocket Guide. Thank you

GabrielMartinez-ezue
Автор

Amazing the moment you realize you've been using CHMOD and have an idea now what its actually doing KUDOS!

kennethnicklowicz
Автор

These videos are the best...you too. Thx a lot!

nikolamilic
Автор

Permissions? More like “Perfect explanations!”

PunmasterSTP
Автор

Hats off to you sir, very nice videos
thanks for making such nice videos

abhimanyuvi
Автор

Amazing, this helped me so much with chmod! thank you :)

Stevesteacher
Автор

if you don't want to learn the numbers you can use 'chmod u+x script' for example, to add execute rights to the user

manningermani
Автор

Could you do a video on binary and octal notation? I have a hard time understanding it, aswell as hexadecimal

newwavex
Автор

So for each owner/group/user there are positions OWNER 2^2, 2^1, 2^0; GROUP 2^2, 2^1, 2^0; and USER 2^2, 2^1, 2^0, where each position can be either 1 or 0 (yes/no, true/false).
If position OWNER 2^2 = true (1), file is readable by OWNER, and since the "true" is in position 2^2, it's evaluated as 4.
to make a 7, all bits have to be true (1), re: 2^2 + 2^1 + 2^0 = 4 + 2 + 1 = 7, in which case the file can be read, written to and executed for the respective user.

And now I'm just going to copy and paste my comment into my YouTube Course Notes. :P

garretmkiii
visit shbcf.ru