Linux File Permissions

preview_player
Показать описание
File permissions in Unix and Linux are wonky af. We'll break down exactly how those pesky drwxrwxrwx strings work.

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

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

amanksdotdev
Автор

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

ChananOren