Back to commands

Hosting Operations

Read-only, can be slow

Group Writable Files by Owning Group

You need to see which groups can modify files under an application tree.

Command

find fixtures/perm-audit -type f -perm -0020 -printf '%g %M %p\n' | sort

Before you run this

System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.

When not to use it: Do not treat group-writable as bad by itself; runtime directories often need it.

Expected output

Group names, modes, and paths for group-writable files.

System impact

Read-only, can be slow. Nothing changes. The command groups writable files by their owning group.

Scope this to the smallest useful path or service on busy systems.

Recovery / rollback: no state is changed.

When to use it

Use when service groups, deploy groups, or shared upload directories are under review.

When not to use it

Do not treat group-writable as bad by itself; runtime directories often need it.

Explanation-only example

Illustrated output, not a live lab run

This example is intentionally illustrative. It shows the command shape without killing real processes or changing your machine.

demo@lab:~$

$ find sample-files/perm-audit -type f -perm -0020 -printf '%g %M %p\n' | sort

root -rw-rw-r-- sample-files/perm-audit/releases/2026-06-25/uploads/customer-export.csv

$ find sample-files/perm-audit -type f -perm -0020 -printf '%g\n' | sort | uniq -c

      1 root
View commands shown

These are the commands shown in the sanitized transcript.

Commands shown

  1. find fixtures/perm-audit -type f -perm -0020 -printf '%g %M %p\n' | sort
  2. find fixtures/perm-audit -type f -perm -0020 -printf '%g\n' | sort | uniq -c

next steps

Related commands

Hosting Operations Can be slow

Find Release Files Writable Outside the Owner

A release file that someone besides the owner can modify deserves a second look.

find fixtures/perm-audit/releases/2026-06-25 -type f -perm /0022 -printf '%M %u:%g %p\n' | sort
Hosting Operations Can be slow

Find Runtime Directories Writable Outside the Owner

Runtime directories often need writes, but the write boundary should be visible.

find fixtures/perm-audit/releases/2026-06-25/storage fixtures/perm-audit/releases/2026-06-25/uploads -type d -perm /0022 -printf '%M %u:%g %p\n' | sort
Hosting Operations Can be slow

Show Enabled Apache Sites

The Apache config existed. The enabled symlink did not.

find fixtures/apache/sites-enabled -maxdepth 1 -type l -printf '%f -> %l\n' | sort
Cybersecurity Triage Can be slow

Find Upload Files Writable Outside the Owner

Uploads are supposed to be writable at the edge, not writable forever by everyone.

find fixtures/perm-audit/releases/2026-06-25/uploads -type f -perm /0022 -printf '%M %u:%g %p\n' | sort
Hosting Operations Can be slow

Audit a Symlink Permission Chain

A symlink can make the path you audited different from the file the app opens.

find fixtures/perm-audit -type l -printf '%p -> %l\n' -exec namei -l {} \;
Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • lpic1:103-gnu-unix-commands
  • lpic1:104-filesystems-permissions-fhs
  • lfcs:essential-commands
  • lfcs:operations-deployment
  • lfcs:services-logs
  • lfcs:storage
  • linuxplus:automation-scripting
  • linuxplus:provisional
  • linuxplus:system-management
  • risk:read-only

Useful for

  • LPIC-1 style command-line practice
  • LFCS style performance tasks
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.