Saturday, 8 March 2014

UNIX:Chmod Calculator

Unix File Permission in Details - chmod Calculator:

This post will give you complete details about Unix file permission. chmod calculator help you to find out the numbers to execute chmod commands.

CHMOD:

Chmod stands for Change Mode and is a command often needed for installing scripts (CGI, PHP etc.) on a UNIX server, after uploading the file (with FTP) you may need to change the permissions. Basically it tells the server who can make what changes to the file or folder, i.e. can the script only read the info, or can it write information as into it as well.

CHMOD CALCULATOR:

Some FTP programs give you something that looks like this to set chmod permissions.
This may help you try it out first and find out if you really are setting the right permissions.


Symbolic Notation
Octal Notation
Description
----------
000
no permissions
---x--x--x
111
execute
--w--w--w-
222
write
--wx-wx-wx
333
write & execute
-r--r--r--
444
read
-r-xr-xr-x
555
read & execute
-rw-rw-rw-
666
read & write
-rwxrwxrwx
777
read, write, & execute


Legend:
CODE
DESCRIPTION
1
execute
2
write
3
write & execute
4
Read
5
Read & execute
6
Read and Write, no execute
7
Full Access

First one is Owner, Second is Group and third is others.

Common ones:
 
PERMISSION
COMMAND
rwxrwxrwx
chmod 777 filename
rwxrwxr-x
chmod 775 filename
rwxr-xr-x
chmod 755 filename
rw-rw-rw-
chmod 666 filename
rw-rw-r--
chmod 664 filename
rw-r--r--
chmod 644 filename


WHAT DO THE CHMOD SETTINGS MEAN?

Chmod tells the server the access privileges for a file. For example, common file settings are:
777: all can read(4) / write(2) / execute(1) the file.
755: owner can do all, group / others can read / execute.
644: owner can read / write, group / others can read only.


COMMON CHMOD SETTINGS

user-group-other read/write permissions
-rw-r--r--  1 DYADAV  dstage  164870 27 Feb 17:58 a.txt

No comments:

Post a Comment