Why is Linux So Secure? | File Permissions and Groups
HTML-код
- Опубликовано: 27 авг 2024
- Linux is the most secure OS you can run on your computer... Here's why:
"Permissions" File attributes that define who can access or change a file
and whether a file can be executed as a program.
"-rwxr-xr-x" Shows file type and permissions.
+-------------+------+-------+
| d--------- | File Type |
+-------------+------+-------+
| - = regular file |
| d = directory |
| l = link |
+-------------+------+-------+
| Permission | Octal| Field |
+-------------+------+-------+
| rwx----- | 700 | User |
| ---rwx-- | 070 | Group |
| -------rwx | 007 | Other |
+-------------+------+-------+
Octal values:
Read = 4
Write = 2
Execute = 1
8 bits = 1 byte. Uses digits 0 1 2 3 4 5 6 7.
You can set permissions in the file manager or with the commend
"chmod." Examples:
Set a file to be executable and readable by
by everyone but only writable by you:
'chmod 755 filemane'
Set execute bit without changing other permisions:
'chomd +x filename'
When applying permissions to directories on Linux, the
permission bits have different meanings than on regular files.
The write bit allows the affected user to create, rename, or
delete files within the directory, and modify the directory's
attributes. The read bit allows the affected user to list the
files within the directory. The execute bit allows the affected
user to enter the directory and access files and directories
inside.
Joe is back with another 100 level 'about linux' video!!! You seem to be one of the few RUclipsrs who has been able to explain these concepts in a way that not only can I understand, but is extremely engaging. Thank you for doing this, even though I've understood user/group permissions for awhile now. A nice refresher.
I can't wait for the sticky bit, suid and guid lessons!
Fun fact! The CD command isn't an executable, it's a Shell built in function. When you use CD it just manipulates the environment variable $PWD. Type 'env' in bash and look for yourselves!
Great video Joe! Thanks!
I don't know if I need to get that deep. Most regular users don't use that anyway. I will most certainly think about it, though. :)
@@EzeeLinux Thanks Joe :)
Hi Joe, greetings from CHIAPAS Mexico.
I remember your old video talking about file permissions, groups, how to change it, etc.
It was really deep and I also remember that some people criticized that it was too long just for talking about files and so on and so forth and many people came to shut those people up because it was really useful for any kind of Linux user ( new, intermediate, power user)
I do love that this refreshing is coming up from you 'cause it's done with a clear voice and the right amount of pace for any person in the world to understand it even if English is not their native language. (Is it difficult for you to hide a little bit your accent?, 'cause I do feel you have a distinctive accent on the radio B99.9, or maybe that's just me, I'm not an English native speaker)
When I make new VM's on another people's machines, I often get the question " why do I need to add me the vbox user to my user if I made the VM, in windows is faster and easier to set it up"
When I explain security and permissions with them it's easier for them to understand it and get it.
One example I use is letting them know how a user in windows needs also permissions to install software when it is not an admin. A normal user it's always asked for the password to install or uninstall anything.
Great to see more Linux content as you promised and by the way, your "audio gear tour was awesome". You got some new toys since last time.
This video is awesome. I can't wait for your next Linux video.
121 views in the first 20 minutes - nice back to basics linux theory which takes me back to my university course 20+ years ago. Note to Windows users: the concepts used years ago still apply to modern software today. I wonder what the oldest original line of code on a modern linux system is? No shame in revisiting the fundamentals of linux.
Thanks Joe,
W10 made me jump to Mint,
now my old Dell works just fine...
will probably buy more refurbished ones just to experiment/learn while keeping the original oldie safe for 'normal' stuff 🤓😃
Greatings from Canada. First Linux install was following your Tutorial on installing Linux Mint, 6 yrs ago Never looked back. Thank you. 👍
I've been using linux on and off (mostly on the raspberry pi) since 2017 and it's only with this video that I finally understood what commands like "chmod 700" really meant, even though I have been using them for quite a while. Fantastic video!
Nice introduction to file permissions. By the way, what the execute bit on directory permissions does is allow read permission on the inodes pointed to by the directory entries. If you do a long list on a directory where you lack execute permissions the contents of the inodes are displayed by question marks (at least on the version of ubuntu I am using). On AIX machines I used in the past you just got a short listing.
That's good feedback.
8:05 It's *normally* the last-modification time, but there's an option to show the most-recent access time as well.
But you're out-of-luck with respect to creation time: for that, you need 'stat' as you've just shown.
Another awesome video on Linux Joe !
I love you .~!
You Rock !
SBF
26:58 - Wait, you have to also add group permissions for that: usually x5x.
ware have you been ? I always listened to your videos ever since I installed Linux Mint Cinnamon years ago and then you disappeared from RUclips Glad to see you are back I'll keep looking for your videos because I have learned so much from you
Thank you for the comment that "Linux is a Unix workalike" and the quick shout-out on Unix.
Joe your the best !
groups are the concept to give peoples the same right as a projectmanager. Other peoples have the right as a Data Inputworker and so on. The group makes it easier in Linux / Unix. A Admin (root) can setup the group permission generally how he wanted.
Really Great Thanks Joe!
TIL now Directory permissions are helpful!
Octal numbers have a relationship to binary similar to the relationship hexadecimal has to binary. While each hex digit can represent a group of four bits in binary, each octal digit can represent a group of three bits. Octal is so named because each octal digit can take on one value out of a possible eight values (0-7).
I started using Linux full time about 4 or 5 months ago. I love how open ended and so customizable it is that you can delete and edit so much. Even to the point you can destroy your whole installation if you're not careful lol. Don't like gnome? Change it. Don't like kde? Change it. Don't like either? Use window managers or command terminal entirely. Much more about it that made me enjoy it as time went on.
Great presentation joe
Like always great video thank you.😊
Thanks Joe!
Just love these videos. Thank you Joe.
Great video Joe,very useful and informative.
how do you break the program drop the punch cards .... great explanation of permissions
*cat > file world!
>EOF
*cat file*
Hello
World!
What a nice content! Could you please make a video on the main differences between a linux root and windows local admin? How it's handled?
Comment and Like !
Thanks
Hi Joe. Great show! Instead of using the chmod command to change the group, why don't you use the chgrp command?
Thanks Joe All the best 🙂
Hey, thanks for a good video about file permissions. Do you have a tutorials for IP tables for less advance linux users? I could use some knowledge on that subject. Like blocking programs from the internet or directories. Or basically firewall for newbies in Linux
Great video keep them coming.
Ignorant Brit, here.. what Southern accent *exactly* do you speak in? It's soooooo precise in the consonants, and clear. Maybe you're just well-practised with a mike, too.
I don't speak any accent that I know of... I have spent 40 years in radio and TV, though. I guess that has something to do with it.
Great info. Thanks!
It has been a while, but I think that the file shows the last modified date and time.
To show the creation (birth) date, use the stat command and the file name.
Yes, you are correct. I just couldn't figure it out while the recorder was running! :)
Good explanation. Also shows the limits of having only 9 bits for permissions. How do you give one group read permissions and another group write permissions? If you have a larger organization, how about allowing groups to be members of groups. I have to set up non linux NFS.
Extended attributes. `setfacl` is the command.
Speaking about broadcasting.... How can I tune in to good 'ol radio show? Well not exactly, being in western Europe. I would need a stream url😅
Just click Listen Live between 7 and midnight EST (US): www.b999fm.com/
Uhm... nobody noticed he did a typo?
toad in the hole.
Pointing at myself..."GROW UP!"🤣
Have you ever made that recipe? Looks pretty good.
Correction: I think you used the chown command instead of the chmod.
What about minix
when changing the group ownership to vboxusers, you might have to also add the group permissions for them also before they vould actually use it... I think..😎 they couldn't do much at 0600 ??
9:07 what about c--------- and b---------
those are Character and Block device files
Permissions . .. .I sill have two USB drives I can no longer use because I filled them up using BU. I don't have 'Permission' to reformat them, or delete the files!
Yes you do!... You can do all those operations as root. Try this: Run 'sudo -s' at the terminal. Now, you're running as root. hook up those drives and delete whatever you want. When you're done just run 'exit' to go back to normal privileges. :)
@@EzeeLinux Perfect, THANK YOU! That worked and I was able to remove the BU folder for a laptop that I no longer own and allow me to continue to use it for my new laptop. Thanks for all your past and ongoing support - it really helps a novice like me figure this new world out!
@@scottmb99 :)
I've heard/read several times that Linux is more secure becuz of groups & file permissions. But doesn't Windows do that too, & I would guess Mac since that's more unix like but I haven't seen it so Idk?
Does anyone know & is willing to tell me why groups & permissions make Linux more secure. I assume when they say "more", they mean more than Windows & Mac, or at least Windows. If I'm wrong can someone tell me what "more" means here?
I'm not so skeptical that HOW they're used makes Linux more secure since people with lots of knowledge repeat it, so it seems safe to accept is probably true, but no one tells us. They keep only saying it's secure "becuz of groups & file permissions", as in it's the fact there are permissions that makes it more secure? They don't say "Linux is more secure than Windows becuz Linux does this with permissions while Windows does it that way" or "Linux does this & that with permissions, but Windows only does this without that".
Is everyone simply repeating a dogma that, like me, they heard repeatedly, but never thought about it to see it's not an explanation at all? Or maybe they figure by explaining how permissions & groups work in Linux, that we already know how they work in Windows &/or Mac & will see for our selves why it's more secure, no explanation needed?
I'd love if someone pointed out the difference that leads to better security. Other than coming across them in Windows (probably 7, where iirc it only used read, write, execute, I just looked & see they now use a few more permissions) while looking at file Properties out of curiosity, without interacting with them, I don't actually know how they work. It turns out that the way I assumed they work when I first saw them is exactly how they do work in Linux. As far as the basics go anyways.
So at my level, it seems like Linux & Windows are equal at using them, so I still don't' know why permissions & groups make Linux more secure. Is it really that different in Windows?
I prefer calling it nuke and pave when starting again from scratch.
My logitech mouse is also hyper sensitive if it's in free wheel scroll mode I only have to cough near it for the screen to scroll 😂
LAST MODIFIED SIR
Is Linux secure?
Jokes, lol
What is a magician called who has lost his magic?
ian
I am really disappointed in Linux Mint