Home » Linux, bash

Linux File Permissions

2 May 2009 No Comment

If you are a linux terminal nut like myself, you should know your options. For instance, say you wanted to change a file permissions so that you can read, write, and execute it, you would use

sudo chmod 777 file.php

A more formal explanation would be described as
$ chmod [options] mode[,mode] file1 [[file2 ...]]

Here is a complete table of octal values and permissions for your viewing pleasure

Permissions Octal Value Description
- – - o none
- – x 1 execute only
- w - 2 write only
- w x 3 write and execute
r – - 4 read only
r – x 5 read and execute
r w - 6 read and write
r w x 7 read, write, and execute

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.