[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 700,701,755,777, HELP !!



This is from my host's documentation on chmod:
(sorry for the html formatting, but it doesn't come through as well as plain text.)

Octal and Symbolic

Some scripts may say 755 this is octal. Others may say -rwxr-xr-x this is symbolic. They both are telling you to set the permissions the same exact way

Read = r = 4
Write = w = 2
Execute = x = 1

There are three types that can get to a file if you allow them to, The Owner, The Group, and Everyone.

So let's assume myfile.cgi requires the owner, to be able to do everything (read it, write to it, and execute it), and requires the group (people/machines with the same access as the owner) to be able to read it and execute it but we do not want them to write to it, and requires the same permissions that the group has given to everyone else.

User = rwx or 7 (since 4 + 2 + 1 = 7)
Group = r-x or 5 (since 4 + 0 + 1 = 5)
All = r-x or 5 (since 4 + 0 + 1 = 5)

The above equals chmod 755 or chmod u=rwx,go=rx

When you realize that setting the permissions on a script to mode 777 means you are giving yourself and the group and EVERYONE else permission to do things to your file, it's easy to see why mode 777 is not always a wise idea.

Default modes if you upload a file to the server and change nothing are:

Summary

There are three types of permissions:
r read the file or directory
w write to the file or directory
x execute the file or search the directory

Each of these permissions can be set for any one of three types of user:

u the user who owns the file (usually you)
g members of the group to which the owner belongs
o all other users

The access permissions for all three types of user can be given as a string of nine characters:

user group others
r w x r w x r w x
Permission File Directory
r read read a file list files in ...
w write write a file create file in ...
rename file in ...
delete file ...
x execute execute a
shell script
read a file in ...
write to a file in ...
execute a file in ...
execute a shell script in ...

Setting access permissions numerically

There is a shorthand way of setting permissions by using octal numbers. Read permission is given the value 4, write permission the value 2 and execute permission 1.

r w x
4 2 1

These values are added together for any one-user category:

1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)

So access permissions can be expressed as three digits. For example:

  user group others
chmod 640 file1 rw- r-- ---
chmod 754 file1 rwx r-x r--
chmod 664 file1 rw- rw- r--

 

Octal and Symbolic

Some scripts may say 755 this is octal. Others may say -rwxr-xr-x this is symbolic. They both are telling you to set the permissions the same exact way

Read = r = 4
Write = w = 2
Execute = x = 1

There are three types that can get to a file if you allow them to, The Owner, The Group, and Everyone.

So let's assume myfile.cgi requires the owner, to be able to do everything (read it, write to it, and execute it), and requires the group (people/machines with the same access as the owner) to be able to read it and execute it but we do not want them to write to it, and requires the same permissions that the group has given to everyone else.

User = rwx or 7 (since 4 + 2 + 1 = 7)
Group = r-x or 5 (since 4 + 0 + 1 = 5)
All = r-x or 5 (since 4 + 0 + 1 = 5)

The above equals chmod 755 or chmod u=rwx,go=rx

When you realize that setting the permissions on a script to mode 777 means you are giving yourself and the group and EVERYONE else permission to do things to your file, it's easy to see why mode 777 is not always a wise idea.

Default modes if you upload a file to the server and change nothing are:

Summary

There are three types of permissions:
r read the file or directory
w write to the file or directory
x execute the file or search the directory

Each of these permissions can be set for any one of three types of user:

u the user who owns the file (usually you)
g members of the group to which the owner belongs
o all other users

The access permissions for all three types of user can be given as a string of nine characters:

user group others
r w x r w x r w x
Permission File Directory
r read read a file list files in ...
w write write a file create file in ...
rename file in ...
delete file ...
x execute execute a
shell script
read a file in ...
write to a file in ...
execute a file in ...
execute a shell script in ...

Setting access permissions numerically

There is a shorthand way of setting permissions by using octal numbers. Read permission is given the value 4, write permission the value 2 and execute permission 1.

r w x
4 2 1

These values are added together for any one-user category:

1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)

So access permissions can be expressed as three digits. For example:

  user group others
chmod 640 file1 rw- r-- ---
chmod 754 file1 rwx r-x r--
chmod 664 file1 rw- rw- r--

Octal and Symbolic

Some scripts may say 755 this is octal. Others may say -rwxr-xr-x this is symbolic. They both are telling you to set the permissions the same exact way

Read = r = 4
Write = w = 2
Execute = x = 1

There are three types that can get to a file if you allow them to, The Owner, The Group, and Everyone.

So let's assume myfile.cgi requires the owner, to be able to do everything (read it, write to it, and execute it), and requires the group (people/machines with the same access as the owner) to be able to read it and execute it but we do not want them to write to it, and requires the same permissions that the group has given to everyone else.

User = rwx or 7 (since 4 + 2 + 1 = 7)
Group = r-x or 5 (since 4 + 0 + 1 = 5)
All = r-x or 5 (since 4 + 0 + 1 = 5)

The above equals chmod 755 or chmod u=rwx,go=rx

When you realize that setting the permissions on a script to mode 777 means you are giving yourself and the group and EVERYONE else permission to do things to your file, it's easy to see why mode 777 is not always a wise idea.

Default modes if you upload a file to the server and change nothing are:

Summary

There are three types of permissions:
r read the file or directory
w write to the file or directory
x execute the file or search the directory

Each of these permissions can be set for any one of three types of user:

u the user who owns the file (usually you)
g members of the group to which the owner belongs
o all other users

The access permissions for all three types of user can be given as a string of nine characters:

user group others
r w x r w x r w x
Permission File Directory
r read read a file list files in ...
w write write a file create file in ...
rename file in ...
delete file ...
x execute execute a
shell script
read a file in ...
write to a file in ...
execute a file in ...
execute a shell script in ...

Setting access permissions numerically

There is a shorthand way of setting permissions by using octal numbers. Read permission is given the value 4, write permission the value 2 and execute permission 1.

r w x
4 2 1

These values are added together for any one-user category:

1 = execute only
2 = write only
3 = write and execute (1+2)
4 = read only
5 = read and execute (4+1)
6 = read and write (4+2)
7 = read and write and execute (4+2+1)

So access permissions can be expressed as three digits. For example:

  user group others
chmod 640 file1 rw- r-- ---
chmod 754 file1 rwx r-x r--
chmod 664 file1 rw- rw- r--
 
 
 

 T  h  e   B  o  a  t  b  u  i  l  d  i  n  g   R  i  n  g
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
 Connecting Boatbuilders & Boatbuilding Projects
 http://www.boatbuildingring.com
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
 

----- Original Message -----
From: "Tom Hilton" <thilton@cros.net>
To: <ringlinklist@gunnar.cc>
Sent: Monday, September 18, 2000 7:27 PM
Subject: [ringlinklist] 700,701,755,777, HELP !!

| I  know I've seen the discription for them somewhere, but I need all of them
| so I'm told, to setup the different files, in the FTP Program, on my
| different servers.
|
| Can anyone tell me what the specific difference between these setting
| numbers, is ???  So I can setup my server.
|
|
| 700
|
| 701
|
| 755
|
| 777
|
| Thanks.
 

References to:
"Tom Hilton" <thilton@cros.net>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]