Linux Server Site Permissions
Connecting
You need to install a SSH client on your system to connect to
your server and change any permissions We recommend using Putty
which is available for download at
The
Putty Homepage
yourdomain.com should be replaced by either the domain
which you are trying to access or the IP address of the server which
the domain is hosted on.
You should select the SSH option, which will change the port
field to 22. When you connect first time you will be asked to accept
the SSH certificate. Accept it.

Connect to your server by using the information specified in the
"shell" options in your control panel.
Basic Commands
Once connected, you have access to some basic commands :-
- ls list files in a directory
- ls -la list all files in a directory including their
permissions
- cd [dir] change down into a directory cd .. move back up a
directory
- chmod [xxx] [file] change file permissions. chmod takes 2
arguments, the permissions and the filename for example,
chmod 755 script.cgi
You could also use the * wildcard to change multiple files.
chmod 755 *.cgi
would change all files with the .cgi extension to 755.
The three numbers specify the permissions for the user, group and
world.
- 7 = readable, writeable and executable
- 6 = readable and writeable
- 5 = readable and executable
- 4 = readable
- 2 = writeable
- 1 = executable
For example when you set a file permission to 755, you are giving
the world (the last digit) read and execute permission, but not
write. The world constitutes visitors to your site.
With the first permission set to 7, the user (ie, the internal
server) can write to it. Setting this permission means that your
scripts can modify files internally.
All perl scripts should have these permissions set. In some rare
exceptions, other permissions can be set, but you should be
extremely wary of ever changing permissions to 777 or 776. This will
allow anyone to change or deface your web site.
Once changed, check that scripts are enabled in your control
panel. You should now be able to run your web scripts.
Permission Calculator
Tick the appropriate boxes
below to calculate your permission number.
|
| |
Information for more advanced users
If you know Linux and have other shell accounts, there are a few
things that you should be aware of.
- Your shell account is chrooted. This means that you only have
access to a few binaries from the command line. Therefore, trying
to run a script from the command line for debugging purposes (eg
perl ./myscript.cgi) will not work.
- "vi" is provided as an editor and as such, should be used for
any on the spot modifications.
- "more" is provided, although "less" is not.
- "grep" is provided. There is a very short timeout on shell
connections, please keep shell sessions to a minimum.
- The shell connection is provided for making changes to your
web site. Using it for other purposes may lead to your site being
disabled.
|