1. Home
  2. Knowledge Base
  3. Web Hosting
  4. Web Design
  5. UNIX File Permission setting strings explained
  1. Home
  2. Knowledge Base
  3. Web Hosting
  4. UNIX File Permission setting strings explained

UNIX File Permission setting strings explained

From the Ipswitch (makers of WS_FTP) knowledge base ( https://support.ipswitch.com/kb/WS-19990114-EM01.htm )

Note that the CHMOD command is native to UNIX (and similar) operating systems. Here is a list of permission types and how they translate when using CHMOD. If you select DIRINFO in WS_FTP, you may get a list of permissions that might look like this: 

-rw-r–r– 1 etracsvc other 1157 Jan 27 23:35 ericm.htm

-rw-r–r– 1 etracsvc other 13095 Dec 10 11:58 animal.gif

drwxr-xr-x 2 etracsvc other 4608 Mar 3 20:51 images/

-rw-r–r– 1 etracsvc other 5257 Mar 3 08:35 index.htm

-rw-r–r– 1 etracsvc other 4996 Feb 12 08:37 index.html

-rw-r–r– 1 etracsvc other 1579 Jan 20 18:44 moe.htm

-rw-r–r– 1 etracsvc other 13142 Jan 28 21:18 larry.htm

-rw-r–r– 1 etracsvc other 5725 Jan 29 09:50 curly.htm

The first column of the print out are the permission strings. These tell the computer who may or may not have access to files. There are 3 groups of letters sequenced, rwx (that is rwxrwxrwx). Each of the 3 groups define permission parameters for different users. The first set pertains to the owner, the second to the group and the third to the world. What all this means is, if you give others permission to write to your files, your web page could get hacked. The letters pertain to specific characteristics

d = directory (all directories must have this) 

r = read (enables read for that group)

w = write (enables write for that group)

x = executable (makes file executable)

In the permission string above, index.html is defined as -rw-r–r–. This means that only the owner can read and write to the file. The group (other) may read the file but not write, and the world may read the file but not write. If you create a file but the permission string gets changed to a world writeable file you must change the permission string by using CHMOD. The table below shows some of the common chmod numbers: The command itself is,

chmod [number] filename.

400 r——– files (won’t let you accidentally erase)

444 r–r–r– files (lets everyone read

600 rw——- files (no one else can read or see files

644 rw-r–r– files (getting the idea?)

664 rw-rw-r– files 

666 rw-rw-rw- files, (note: this could allow havoc of satanic proportions)

700 rwx—— programs and directories

750 rwxr-x— programs and directories

755 rwxr-xr-x programs and directories

777 rwxrwxrwx programs and directories

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact E Street Support