File permissions: rwx and chmod
Sign in to read this lesson
One of the most common errors in Linux is "Permission denied". In this lesson we learn to read the `rwxr-x---` text in `ls -l` output, what read/write/execute mean for files and directories, and how to change them with `chmod` in symbolic and numeric form.
What you will learn
- Every file has three permission sets: owner (u), group (g), others (o); in each set
ris read,wwrite,xexecute. - On a directory
rmeans listing the names,wcreating/deleting files inside,xentering it. - Numeric form: r=4, w=2, x=1;
755= rwxr-xr-x,644= rw-r--r--,600= rw-------. - Symbolic form:
chmod u+x,chmod g-w,chmod o=,chmod -Rfor a whole directory. 777is never the fix: if the problem is ownership, fix it withchown(next lesson).
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.