~/ learn/ comp-400/ cards/ Nine bits, three more, and why a directory outranks a file
1 of 9

Build the situation: a 644 file inside a 730 directory owned by another user

Build the situation: a 644 file inside a 730 directory owned by another user

Answer

mkdir /srv/shared chgrp staff /srv/shared chmod 730 /srv/shared printf 'v1 approved\n' > /srv/shared/report.txt chmod 644 /srv/shared/report.txt ls -ld /srv/shared /srv/shared/report.txt

The final `ls -ld` prints `drwx-wx---` for the directory and `-rw-r--r--` for the file. Nothing here is unusual: 730 is what you get when you want a group to be able to drop files in without reading each other's, and 644 is the default mode of almost every file on the system.

Stallings & Brown, Computer Security 5e, ch4 §4.4–§4.5

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/ee97da52-7f04-4fa7-ad37-292ef0b64d64/flashcard utf-8 LF