TutsFx logo
Linux Intermediate Updated 8 minutes ago

Linux File Permissions Explained

Understand rwx, octal modes, ownership and the special permission bits — and fix permission problems for good.

J Jane Doe 4 lessons ~9 min total 3 views

Permission errors are among the most confusing moments for new Linux users: Permission denied. This tutorial removes the mystery. You will learn exactly what those ten characters at the start of ls -l mean, how to read and set permissions with chmod, and how ownership with chown and chgrp fits in.

!

Run these commands on a test directory

Some examples change system files. Work in a scratch directory in your home folder while following along.

By the end of this tutorial you will be able to:

  • Read ls -l permission strings fluently
  • Set permissions with symbolic and octal modes
  • Change owners and groups with chown and chgrp
  • Explain setuid, setgid and the sticky bit

Tutorial Lessons

  1. 01 Reading Permission Bits Decode the ten characters produced by ls -l: file type, rwx triads and more.
  2. 02 Changing Permissions with chmod Set permissions symbolically and with octal numbers.
  3. 03 Ownership with chown and chgrp Change the owner and group of files, and understand when you need sudo.
  4. 04 Special Permissions: setuid, setgid and the Sticky Bit The fourth permission slot — setuid, setgid and the sticky bit on directories.
Share:
Tags: Forms Grid Php

We value your privacy

We use cookies to enhance your browsing experience, serve personalized ads, and analyze traffic. By clicking "Accept", you consent to our use of cookies. Read our Privacy Policy to learn more.