whatis file-permissions

File Permissions (rwx)

Also known as: rwx, Unix permissions, mode bits

Read, write, and execute bits set separately for a file's owner, its group, and everyone else, shown as -rwxr-xr-- by ls -l.

How Do Linux File Permissions (rwx) Work?

Every file has three permission triplets: user (owner), group, and other. For files, r allows reading, w allows modifying, and x allows running. For directories, r lists names, w creates and deletes entries, and x allows entering and accessing items by name.

Each triplet maps to an octal digit (r=4, w=2, x=1), so rwxr-xr-x is 755 and rw-r--r-- is 644. They are changed with chmod and ownership with chown.

Example

ls -l script.sh
# -rwxr-xr-x 1 alice dev 214 script.sh