Skip to Content
Navigation:

A stick figure smiling

Here's a preview from my zine, Bite Size Linux!! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript".

browse more comics! get the zine!
read the transcript!

panel 1:

There are 3 things you can do to a file.

read write execute

panel 2:

Is -1 file.txt shows you permissions. Here’s how to interpret the output:
rw- bork (user) can read & write
rw- staff (group) can read & write
r– ANYONE can read

panel 3: File permissions are 12 bits

First digit: setuid
Second digit: setgid
Third digit: sticky

User 110 rwx
Group 110 rwx
all 100 rwx

For files:
r = can read
W = can write
X = can execute

For directories, it’s approximately:
r = can list files
W = can create files
x = can cd into & access files

panel 4:

110 in binary is 6

so rw- = 110 = 6
r– = 100 = 4
r– = 100 = 4

chmod 644 file.txt|
means change the permissions to: rw- r– r–

Simple!

panel 5:

setuid affects executables
$1s-1/bin/ping

rws r-x r-x root root
the s means ping always runs as root

setgid does 3 different unrelated things for executables, directories, and regular files.

person: unix! why??
unix: it’s a long story

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)