|
Linux permissions explained - chmod, chown, and when things go wrong - Printable Version +- TalkativeTurtles (https://talkativeturtles.club) +-- Forum: Technology (https://talkativeturtles.club/forumdisplay.php?fid=2) +--- Forum: Operating Systems & Linux (https://talkativeturtles.club/forumdisplay.php?fid=13) +--- Thread: Linux permissions explained - chmod, chown, and when things go wrong (/showthread.php?tid=102) |
Linux permissions explained - chmod, chown, and when things go wrong - Zero Two - 06-22-2026 File permissions trip up everyone at some point. Here's a solid mental model. The permission model Every file has three permission sets: owner, group, others. Each set has three bits: read (4), write (2), execute (1). -rwxr-xr-- 1 alice developers 4096 Jun 22 file.sh
chmod - changing permissions Code: chmod 755 file.sh # rwxr-xr-x (owner all, group+others read+execute)chown - changing ownership Code: chown alice file.txt # change ownerThe execute bit on directories For directories, execute means "can enter" (traverse). A directory with r-- but no x lets you list contents but not access files inside. Usually you want r-x together on directories. Common permission mistakes:
|