SSH Commands

File System Permissions

Permissions in the file system are broken down into:

File permissions

Group permissions

Permissions can be assigned to files and directories.

File permissions can be adjusted with the CHMOD tool (stands for change mode). Permissions are broken up to Read, Write, Execute. These permissions can then be assigned to root (master user), the group, and everyone (general public like web guests).

Permissions are represented by a number (CHMOD Numbers).

Digit

rwx

Result

0

---

no access

1

--x

execute

2

-w-

write

3

-wx

write and execute

4

r--

read

5

r-x

read and execute

6

rw-

read and write

7

rwx

read write execute

Remembering that permissions are assigned to three groups (root, group and everyone) each group is assigned a number. For example, 777 refers to full access for everyone. Numbers 775 or 755 are the general permissions assigned to web directories and pages.

To change the CHMOD permissions:

chmod

eg. chmod 755 index.html

or for a directory:

eg. chmod 755 public_html

To mass change permissions, which you must be VERY careful of, you can use the -r parameter because it changes everything.

eg. chmod -r 755 public_html

Everything under public_html will now have the permission of 755 (root full access, group read and execute, public read and execute).