Interview Prep/Linux/Permissions, ownership, SELinux and mounts

Users can delete each other's files in a shared `/srv/shared` directory with mode `777`.

BeginnerTroubleshootingPermissions, ownership, SELinux and mounts
Answer

Likely causes → Without the sticky bit, anyone with write on a directory can delete any file in it.

Diagnose →

stat -c '%A' /srv/shared

Fix → chmod 1777 /srv/shared (or better, a group with 2770 + sticky: chmod 3770).

Prevent → Use group-based shared dirs instead of world-writable ones.

All Linux questions Roadmap: Linux

More on Permissions, ownership, SELinux and mounts