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...
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)).
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).
@@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.