|
StaticStore » StaticStore Manual » Permmissions
Permissions
3.1 What it is.
3.2 How it works.
3.3 How to set file permissions using the unix command:
Chmod.
3.3.1 How to
set permissions from your ftp client/program:
3.3.2 How to
set permissions from telnet or SSH
3.1 What it is.
A defined set of rules that govern the access rights to files and directories.
These rules give some users the 'right' to do certain things with/to files, while
limiting others on what 'they' may do.
3.2 How it works.
When listing the contents of a directory using the unix command, ls -l, you may
see a listing like this:
| Permission |
|
Owner |
Group |
|
Date/Time |
Diretory/Filename |
| drwxrwxrwx |
1 |
root |
root |
25 |
May 5 22:40 |
cgi-bin |
| -rwxrwxrwx |
1 |
yourname |
users |
195 |
May 7 11:41 |
test.txt |
| drwxrwxrwx |
1 |
root |
root |
24 |
May 5 22:40 |
www |
In the Permission column, the first letter indicates whether the listing is a
file (-), directory (d) or link (l).
The permissions listed thereafter can be disected into three sets:
rwxrwxrwx = rwx(owner) rwx(group) rwx(everyone
else)
The read, write, and execute permissions are referred to as r,w, and x respectively.
This item can be considered 'open to everyone' as all sets in this permission group
can read, write & execute to the file or directory. Consider this item:
rwxr-x--x = rwx(owner) r-x(group) --x(everyone
else)
Here the permission setting of rwxr-x--x states that:
- the owner has full permissions to the file
- the 'group' is allowed to read and execute(run) the file
- the 'everyone else' set may only run the file, they aren't allowed to read
or modify the contents of the file.
The 'Owner' column lists the owner of the file or directory, and the 'Group'
column lists the name of the group for the file or directory.
3.3 How to set file permissions using the unix command: Chmod.
The chmod command uses number values instead of rwxrwxrwx to set the file permissions.
The permission sets in the above section can also be displayed in numbers:
rwxrwxrwx = 421(owner) 421(group) 421(everyone
else)
Now add the numbers in each set together to get:
rwxrwxrwx = 7(owner) 7(group) 7(everyone
else) = 777
So if you need to use the chmod command; specify values.
The numeric value of rwxr-xr-x would be 755.
3.3.1 How to set permissions from your ftp client/program:
Most FTP clients have this ability. In your FTP client there should be a menu
item or button with which you can change the attributes or permissions of your
selected files or directories.
3.3.2 How to set permissions from T elnet or SSH
Telnet/SSH into your host/server and go to the directory that holds the directory
or file(s) you want to set permissions on.
To change the permissions of files or directories you would type (indicated in
blue):
[Some Unix Prompt] chmod 777 somedatadir_or_file
Where 777 is the permission value you have been instructed to set.
This will give the specified file the permission setting of rwxrwxrwx
Index
|