Can you explain unix/linux file permissions?

Owner = the files users (you)
Group = the files group
Others = others

Permissions Definitions:

r = read access
x = execute access
w = write access

Numerical Definitions:

r = 4 
w = 2 
x = 1

You will come to recognize, if you do not already, Chmod as a word used for changing Permissions from within Telnet or your FTP client.

Some scripts will tell you to chmod 775 (for example). When using the numeric system, the code for permissions is as follows:

4 + 2 + 1 (rwx) = 7

The first number applies to Owner, the second number applies to Group, and the third number applies to Others. Therefore the first 7 of the chmod 775 tells Unix to change the Owner's permissions to rxw (because r=4 + w=2 + x=1 adds up to 7, this giving the Owner Read, Write, and Execute Permission. The second 7 applies to the group, this giving the Group Read, Write, and Execute Permission, and the last number 5, refers to Others (4 + 1= 5), giving Others only Read and Execute Permission. The permissions for chmod 775 look like this:

-rwxr-xr-x

Permissions are always broken up into three groups of letters, however if there is a dash, this dash simply means that Permission wasn't given for that particular function, for example in the chmod 775, Permission to Write was not given to Others.

Remember: the first 3 letters always apply to Owner, the second 3 apply to Group, and the third 3 apply to Others

Esta resposta foi útil?

 Imprimir este Artigo

Leia também

I am having a problem with my CGI script. Do you have any advice before contacting support?

Below are solutions to some of the more common CGI script problems. When I activate my CGI...

Where can I find server paths used in my CGI or PERL scripts?

  The following server resources paths applicable to only CPanel customers. Perl path (...

How to setup bnbform on website ?

Here are the steps you need to following to setup bnbform on your site: 1. Download this zip...

Which script I need to use for my Formail application ?

You can download bnbform.cgi from http://www.bignosebird.com/carchive/bnbform.shtml Bnbform.cgi...

What scripts banned on your servers ?

The following scripts are banned from use on our servers and may not be uploaded or run. Reasons...