Linux File Types and File Permissions

preview_player
Показать описание
We take a deep dive into Linux file types and permissions.

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

Nicely done Joe. I'd like to offer a little cheat sheet on the symbolic approach:

Change permissions Symbolic Mode

Format:
chmod [class/es] [operator] [permission/s] [filename]

Classes (all is assumed if not specified):
u=user/owner
g=group
o=others
a=all of the above

Operator:
+ add permission/s
- remove permission/s
= make permission/s as specified

Examples:
Give write and execute permissions to user and group
chmod ug +wx filename
Give execute permissions to all
chmod +x filename

broadswordebroadsworde
Автор

Joe, I think you already answered your own question on the deletion of a file you don't have write permissions to, but just to clarify the way I learned it (the hard way!), deleting a file is dependent on the write permissions of the directory it's contained in. The warning comes up because you're not the owner. When you delete a file you're modifying its directory, therefore you need write permission there.

JasonThaine
Автор

You should make a video about exiting vim, over one million people struggle with that problem

biehdc
Автор

Thank you Joe, great content. I am diving head first into the world of Linux recently, and your channel is really helpful. Also, loving the long format of the videos, everything's in "one place", it just feels neat. Thank you again :)

trmsy
Автор

Thank you for this great walkthrough of file/folder permissions, I now have a much better understanding than i did before i watched this video.

AndrewMillarNZ
Автор

Yo, Joe!
Thank YOU! For these wonderful videos you have produced. They have helped me so much. You'll probably never kno how much or how many ordinary folks like myself you have helped figure this stuff out. Everytime I've had something I don't understand I come to your YouTube channel and sure enough I find my answer.
Awesome work my friend, thank you!!

JimNicholsMotorManiaGarage
Автор

Just a small point of order for your analogy, it doesn't really matter for this example, but to be completely accurate the filing cabinet drawer might actually be analogous to the filesystem when it comes to Linux as a hard disk can have multiple filesystems and most Linux systems mount more than one even when you have just one on the disk (/dev, /dev/pts and so forth).

booleanenator
Автор

Definitely this is a very useful video for new users but I have to do some remarks. Its long duration can discourage newbies to watch it. Experienced users, they already know all that stuff. Therefore, if you want to make it more attractive, I think you should split the video in sections with titles, specifying the beginning and the end of each section in the description (e.g intro 0.00 - 4.55)
Also this procedure will be very useful for someone if he/she wants some time in the future to rewatch the video looking for something specific.

Hope you understand that my comment is not offensive.

frozenDMN
Автор

when you have write permissions on a directory you can remove any files from that folder because you can modify the folder.

katanasteel
Автор

I never tried deleting a file owned by root that was in my home directory. I just assumed I would not be able to do it. It appears that this took you by surprise as well. Thanks for the explanation of the octal way to change file permissions. I never really got that right before.

eznix
Автор

love your channel Joe. I really appreciate the "newbie" approach you take, it helps me remember it's ok to have to reinstall the OS several dozen times because I'm still learning.

vitelliu
Автор

Sir, this is an amazing work with a lot of information can only be given by someone expert in the subject and its history and purposes whatsoever. I am glad you have made this video

curiousaurus
Автор

Great video Joe. Could you also do a detailed video like this on suid, guid, and the sticky bit?

ful
Автор

Thanks! I finally got the octal system!

vychan
Автор

Groups are still very important and used, there are instances when across a company you want all staff to have certain permissions, and when you need to modify their permissions you want to be able to do that on one command rather than going through all user accouns

georgejames
Автор

Groups still provide a viable means to "switch hats" during a session.
I must switch to a [password-protected] developer group in order to access my program source files (which is also a separate volume mount).
Note that if like you this idea and what to try it, you must set the gateway directory's owner to 'nobody', with zero permissions, and then all the desired options granted via the developer group (so it's usually 070 - in octal). Just remember that the system will first try the owner permission before even looking at the group.

Similarly, it's a very good idea to implement a password-protected "wheel" or "admin" group that provides augmented access, but still short of the superuser. I've found this useful when doing a lot of routine work [editing, copying, script development/testing, etc.] involving non-priviledged commands, but is being done in sensitive areas (/root, /etc/, var/lib, etc.). Naturally this must be accompanied by a change to root's umask, and even its default group. So maybe this isn't for everybody, but it's quite viable for my home system.

jimwinchester
Автор

From where did u get Billy\ Joel\ -\ Big\ Shot.mp3 ? You should explain this too, as not everyone can understand as you already mentioned that is for new comers!

MyGardenForYou
Автор

If your directory has the "sticky" bit set (that fourth group of 3 bits in the permissions) it wouldn't have let you delete that file. The existence of the file is a hard link (not to be confused with a symbolic link) to the file and is based on the permissions of the directory. There can be another link to that file that belongs to a completely different user in another directory even.

booleanenator
Автор

thanks for wonderful explanation !! Joe, you mentioned "everything is file" and I too quite often hear this in Linux world (I am very very newbie to linux env) - I searched around lot for this phrase but still not found digestible..can you help or point to some doc/tutorial with easy explanation ?

rahulaga
Автор

One really helpful thing to know is that macOS is a UNIX operating system. Apple's done a lot of mods but at it's core, macOS, iOS, tvOS, and even watchOS are UNIX operating system.

JamesR