Setting UNIX Permissions
Please read this entire page before attempting to set your own permissions on our server.
Check the permissions you desire to assign in this top table. The appropriate
permission string will be displayed in the numeric field in the bottom table.
|
UNIX Permissions:
Welcome to our tutorial on UNIX permissions. We've made these instructions in an attempt to show
how to set the permissions in your directories (public_html or other).
From the outset, UNIX was designed as a multiuser operating system. This is in start contrast to
DOS for example which is definitely a single user operating system. Because multiple people can
log onto and use a UNIX system simultaneously, security is a very big concern; even more so in a
networked environment like the Internet. For security reasons, UNIX lets you set permissions on
your files. These permissions let you determine who you give access to, and what level of
access you give.
Who gets access
When it comes to assigning permissions for a file or directory, there are three main categories
for which you can assign or deny access:
- Owner: the owner of a file or directory is usually the creator of that file or
directory. If you create or place a file or directory on our server, you are the owner of the
file or directory.
- Group: this is the group to which you belong. Or, more specifically, the group to
which the owner of the file belongs. Everyone belongs to a group. When we created your account
here at On-Net, we made you a member of a specific group. Some people belong to more that one
group.
- Other: this is the world. "Other" refers to all people other than yourself (owner) and
your group.
Permissions: what can be done
In a UNIX environment, there are three main permissions that you can give to a file or directory.
These permissions determine what can or cannot be done to the file or directory. The three main
types of permissions are:
- Read: This lets you look at (read) a file. For this reason, the files in
your "public_html" directory must be set to "read" for owner, group, and other if you want
your web pages to be viewable. If you don't want the world to be able to view a particular
file, you had better set permissions for that file so that unwanted people do not have read
permissions.
- Write: This is by far the most dangerous permission. Anyone who has write permission
to a file or directory can change or even delete that file or directory. For this reason, we
strongly suggest that you do not give write permissions to anyone other than yourself.
Certainly do not give write permission to "other".
- Execute: This permission lets anyone with permission execute a "read" on a directory or
execute a program in a directory. If you have a functioning program on our server, it is best
to restrict execute permissions to only those who absolutely must have it. This gets confusing,
but remember that in order for the contents of a directory to be read, the directory must be
executable.
How Do I Set Permissions?
You can set the permissions for your files and directories in a number of ways. For those of you
familiar with FTP (File Transfer Protocol), many FTP programs allow you set the permissions on
files that you transfer up to our server. Usually though, permissions are set using your shell
account at the UNIX prompt. Here's how to do it:
- Get a "telnet" or terminal emulation program (telnet is preferable), learn how to start it.
If you are using Windows 95, there is a fine telnet program in the c:\windows directory. It's
called "telnet.exe". The host name (computer name) that you will need to telnet to
is "sam.on-net.net".
- Login using telnet.
When you start the telnet program and telnet to us, you should see the following prompt on
your screen:
SunOS UNIX (sam)
login:
At this prompt, enter your username and hit the <Enter> key on your keyboard. You will then be
prompted for your password. Type your password and hit <Enter> on your keyboard. If all is right,
a connection will be established and you will be allowed into the system. When you initially connect
to our system, you will be in your home directory by default. If successfull, you will see
something similar to the following:
Last login: Wed Jul 2 12:58:27 from johndoe
SunOS Release 4.1.3_U1 (Sam.noslip) #3: Thu May 29 19:35:41 EST 1997
$
Type pwd and hit the <Enter> key on your keybord to show your current directory.
- Setting permissions on your home directory.
In UNIX, permissions are set with the "chmod" command followed by a three-digit numerical string
that specifies the permissions and the filemane or directory name for which permissions are to be
set. Thus, the syntax for the chmod command is: chmod numericString filename. At the "$" prompt,
type cd .. and hit the <Enter> key on your keyboard. This will move you up one directory
in the directory structure on our server. At the "$" prompt, type in chmod 711 yourusername and
hit the <Enter> key on your keybord. Example: chmod 711 johndoe.
If you then see only the "$" prompt, you have successfully set the permissions on your home
directory.
Now, type cd yourusername and hit the <Enter> key on your keybord to return to your own
home directory. Type pwd and hit the <Enter> key on your keyboard to confirm that you are
back in your home directory.
- Setting permissions on your public_html directory.
While in your home directory, type chmod 711 public_html and hit the <Enter> key on your
keyboard. If you see only the "$" prompt, you have successfully set the permissions on your
public_html directory where all your web files should be.
- Setting permissions on your index.html file/web files.
While in your home directory, type cd public_html and hit the <Enter> key on your
keyboard. Type pwd hit the key on your keybord to confirm that you are in your
public_html directory. Type chmod -R 644 * and hit the <Enter> key on your
keyboard. If you then just see the "$" prompt, you have successfully set the permissions on your
main index.html file.
- Setting permissions for other files.
Setting permissions for your other files is done the same way as in step 5 above. Just remember,
to set permissions for a particular file, it's best to be in the same directory that the file
is in. If you are not sure what to set your permissions as, use our JavaScript Permissions Form.
Using this form, just check the priveledges you would like to assign in the first table; the
correct permission string will appear in the second table as the numeric value that you should
use. Or, type in a three-digit numeric value in the second table to see which permissions are
assigned using that value in the top table.
Setting permissions is extremely important. If you have any questions after reading this
tutorial, please don't hesitate to e-mail us at "helpdesk@onet.net" or call us at (317)876-6000
before you make a mistake and jeapordize the security of your files.
-----------------------------------------------------------------
Tech support may be reached at (317) 876-6000, please leave a voice mail for us after
hours. You may reach us by e-mail at helpdesk@on-net.net.
|
|