Blog | G5 Cyber Security

Linux User Permissions Comparison (No Root)

TL;DR

You can compare Linux user permissions without root access by examining the output of id and groups for each user, and comparing file/directory ownership and permissions using ls -l. You won’t see *all* details (like other users’ group memberships), but you can determine effective permissions for files you have access to.

How to Compare Linux User Permissions Without Root Access

  1. Understand the Basics
  • Check Your Own Permissions
  • Start by understanding your own user ID and group memberships:

    id

    This will output something like:

    uid=1000(yourusername) gid=(yourgroup) groups=(yourgroup, othergroups)
  • Check Another User’s Basic Permissions
  • You can see another user’s UID and primary group using id . However, you won’t be able to see all their group memberships without root access.

    id otheruser

    Example output:

    uid=1001(otheruser) gid=(othergroup) groups=(othergroup)
  • List File Permissions
  • Use ls -l to see the owner, group, and permissions of a file or directory. This is the most useful command.

    ls -l myfile.txt

    Example output:

    -rw-r--r-- 1 yourusername yourgroup 2048 Jan 15 10:00 myfile.txt
  • Interpreting Permissions
  • Comparing Permissions – Example
  • Let’s say:

    You can determine:

  • Limitations
  • Exit mobile version