Linux File Permissions (Animated)

Поділитися
Вставка
  • Опубліковано 3 кві 2024
  • File permissions in Unix and Linux are wonky af. We'll break down exactly how those pesky drwxrwxrwx strings work.
    Learn back-end development - www.boot.dev
    Learn Shells and Terminals - www.boot.dev/learn/learn-shel...
  • Наука та технологія

КОМЕНТАРІ • 13

  • @amanksdotdev
    @amanksdotdev 3 місяці тому +3

    I'm watching a bootdev video after a long time, looks like a huge upgrade. Good editor and writing. GG.

    • @bootdotdev
      @bootdotdev  3 місяці тому +3

      Welcome back! glad you're enjoying. We're going to be making a lot more now that we've found a style we like

  • @bitpilot79
    @bitpilot79 3 місяці тому +1

    Short and clean, thanks!

  • @ChananOren
    @ChananOren 3 місяці тому +1

    0:34 The most common is 'd' or '-', more are possible take a look under "/dev". There is also 'c' (character device), 'b' (block device), 'l' (symlink), 'p' (named pipe [mkfifo command creates this]; eza shows this as '|' [pipe symbol]), 's' (socket; e.g. `nc -lU socket.sock`).
    The 'x' for user/group can be an 's' (setuid/setgid) or 'S' (same but missing execute permission), for other it can be 't' (sticky bit) or 'T' (missing execute) (see /tmp).
    chmod also takes numeric permissions (octal): rwx = r(4) w(2) x(1) in "ugo" (user, group, other) order, so 750 is user = rwx, group = r-x, other = ---. There can also be a four-digit permission, /tmp is 1777 = rwx for user, group, and other plus the sticky bit (that position can also be setuid(4), setgid(2), and sticky(1)).

    • @bootdotdev
      @bootdotdev  3 місяці тому +1

      Good point! We just showed the simple options

  • @wagslane
    @wagslane 3 місяці тому +1

    Stass is the GOAT

    • @sledge_remirth
      @sledge_remirth 3 місяці тому +2

      Look at this man claiming first on his own video

    • @wagslane
      @wagslane 3 місяці тому +2

      @@sledge_remirth rekt nerd

    • @bootdotdev
      @bootdotdev  3 місяці тому +1

      stop bullying the viewers lane...

    • @ryanwilliams5499
      @ryanwilliams5499 3 місяці тому +1

      woah...howcome this wagslane looks so different from Backend Banter wagslane? are they the different peepo?

  • @hvaghani
    @hvaghani 3 місяці тому

    What about access control list?

    • @ChananOren
      @ChananOren 3 місяці тому

      On Linux, pretty much the same just allows you to set different permissions for different users/groups. e.g. `setfacl -m u:otherusername:rw somefile` (gives rw to otherusername, use "g:groupname" for groups).

    • @hvaghani
      @hvaghani 3 місяці тому

      @@ChananOren yeah. It was pretty useful when I had to mount /var/log directory in log aggregator pod but didn't want to run the pod with root privilege. I spin up the init container with root access that sets right acls.