Fundamentals 6 min read

Master Linux Permissions: Root, Users, Groups, and chmod/chown Demystified

This guide explains Linux system management fundamentals, covering the role of the root user, how to create and manage users and groups, methods to view file permissions, and detailed usage of the chmod and chown commands for controlling access rights.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master Linux Permissions: Root, Users, Groups, and chmod/chown Demystified

Linux System Management Overview

Root user

The root (super‑user) has unrestricted privileges on a Linux system, allowing installation of software, modification of system files, and management of accounts.

Switch to the root account: su Modern distributions prefer sudo to run individual commands with elevated rights instead of logging in as root. sudo apt-get update The sudo configuration is stored in /etc/sudoers, where you define which users or groups may execute which commands with sudo.

User and group management

Linux is a multi‑user operating system; managing users and groups is essential for security and permission control.

Add a new user: sudo adduser username Delete a user: sudo deluser username Change a user’s password: sudo passwd username Add a group: sudo groupadd groupname Delete a group: sudo groupdel groupname Add a user to a group:

sudo usermod -a -G groupname username

Viewing permission information

Use ls -l to list files with their permission strings. ls -l filename Sample output:

-rwxr-xr-- 1 owner group 4096 Dec 20 12:34 filename

The string -rwxr-xr-- shows read/write/execute for the owner, read/execute for the group, and read‑only for others. r: read permission w: write permission x: execute permission

chmod – changing file permissions

The chmod command modifies the access mode of files and directories.

Numeric mode (owner‑group‑others): chmod 755 filename 7 = rwx for owner, 5 = r‑x for group, 5 = r‑x for others.

Symbolic mode: chmod u+x filename Adds execute permission for the file owner.

chown – changing ownership

The chown command changes the owner and optionally the group of a file or directory.

Change owner only: sudo chown newowner filename Change owner and group: sudo chown newowner:newgroup filename These commands are essential for assigning proper ownership after creating users or groups.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

System AdministrationUser ManagementPermissionschmodchown$root
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.