Site Panel Help User Panel Help Panel Demo's Search Help


· Show all categories

New Customer FAQs
FTP - File Transfers
SSH and Telnet
Scripting Languages
   Perl - Cgi
   Php - Dynamic Pages
   SSI - shtml
Password Protection
Power Tools

· FAQ Home

· EchoEcho+ Support

Scripting Languages: File permissions - chmod
If you upload scripts to your hosting account you need to make sure the files are set with the correct permissions or the web server will not execute them properly.

File permissions are controlled with the chmod command on Linux servers.

The chmod command can be launched from most FTP programs, or from the FileManager in the site owner panel or from a direct command login to the server via Telnet or SSH.

You can assign rights to:
1: the file owner
2: the group
3: the world

Each of these three can have Read, Write and Execute permissions. In general you should never assign Write permissions to "the world". If you do so - the Apache webserver will refuse to execute the file cause it'd be a huge security hole.

The three permissions are set with digits (for example 755) or letters (for example -rwxr-xr-x).
The first digit is the file owners permissions. The next is the groups permissions and the last is "the worlds" permissions.

Below is a listing of the most typical numeric settings (charcter settings are explained further down):

chmod 600 filename
You can read and write; the world can't. Good for files.

chmod 700 filename
You can read, write, and execute; the world can't.

chmod 644 filename
You can read and write; the world can only read. Good for html and php pages.

chmod 755 filename
You can read, write, and execute; the world can read and execute. Good for perl scripts.

Change file permissions with letters:

u = user (you)
g = group
a = everyone

r = read
w = write
x = execute

chmod u+rw filename
Give yourself read and write permission

chmod u+x filename
Give yourself execute permission.

chmod a+rw filename
Give read and write permission to everyone.

Last update: 12.07.2009, 21:13
Author: EchoEcho Support

printer-friendly version Send to a friend
Show this as PDF file export as XML-File

Average rating: 0 from 5 (0 Votes )

Please rate this entry:





You cannot comment on this entry | Content Overview: Scripting Languages
Copyright © EchoEchoPlus Hosting