Bookmark and Share

Setting File Permissions On A Unix Server


File permissions are one of the strengths that the Unix world has had over it's Windows contemporaries. Permissions are a means to control access to information on a computer, on a file by file basis. There are several layers of control, and these will be discussed below.

For the purpose of this series of tutorials, I have been using a free FTP program called Core FTP Lite to upload files to my server. I am using this program to describe my examples.

Ok, to begin, let's say that we have uploaded some files to a server.

We are discussing uploading scripts in general here, and certainly for many scripts, the creators may well specify certain 'permissions' that need to be set in order for the scripts to operate correctly. Let's take a look at a set of files on a server. In Core FTP Lite, the server files are shown in the right hand pane. Select one and then right click on the highlighted file.If you use a different FTP client, I expect that the layout will be very similar.

Run the mouse down to the bottom of the menu and select the item marked 'Properties'. Click on this option, and another dialog will appear.

You will see that the file in question (in this case a directory) is being shown in the 'File' field at the top of the screen.

What we are really interested in, is the tick boxes in the bottom half of the screen. These hold the file 'privileges' or 'permissions' for this file or directory.

There are three types of 'permissions' available.

* User - which means the person signed on who is setting the permissions

* Group - which means a specific group of users for whom access to the file has been granted

* World - which means everyone.

Within these groups of users, there are 3 distinct types of permissions

* Read - which means that permission to read a file, but not alter it or run it

* Write - which means permission to write to a file and change it

* Execute - which means permission to execute a file, which is important in the case of scripts for example.

Permissions are sometimes called by these names (read, write, execute) but are more commonly referred to using letters 'rwx'. In addition, permissions are sometimes referred to by a single number '755' for example. In the picture above, you will see a value box. This is the number being referred to. How is this number made up? Well let me explain.

Read
User 400

Group 40

World 4

Write
User 200

Group 20

World 2

Execute
User 100

Group 10

World 1

Each value for each setting is shown. Try them out by ticking them, and see the number in the 'Value' field change accordingly.

So, lets look at a real example

Can you see how the number 755 is made up? Add up the individual values from the value table and see.

So hopefully you can see, that setting file permissions with the right tool is not hard at all.

Charlie Cory worked or many years running a HelpDesk for a software house, and has experience in many operatng systems and technologies. The online aticle contains many pictures which help bring this tutorial to life.

Setting file permissons

© Athifea Distribution LLC - 2013