CHMOD: File Permissions
Telnet/cgi-bin>chmod 755 filename.cgi
Another common permission, though it can be a security risk (anyone can write to the file), allows everyone in every grouping to read, write, and execute the file. The number for this is 777.
These numbers do mean something: The first number sets the permissions for the owner, the second sets the permissions for the group, and the last number sets the permissions for anyone else (other). Look at the chart below to see what each number means:
|0 (zero)||No Permissions
(the user(s) cannot do anything)
(the user(s) can only execute the file)
(the user(s) can only write to the file)
|3||Write and Execute Permissions|
|5||Read and Execute Permissions|
|6||Read and Write Permissions|
|7||Read, Write and Execute Permissions|
So, placing 7 in all three positions means that everyone in every group can read, write and execute the file. That is how we get the number 777 for this.
As another example, if you use chmod 650, here is the breakdown:
The first number, 6, gives the owner read and write permissions.
The second number, 5, gives the group read and execute permissions.
The last number, 0, gives all others no permissions for the file.
Well, hopefully that will make file permissions a little less troublesome for you. Now you will know how to set certain file permissions without guessing at random, although that eventually works too!
If you came from the Perl script installation tutorial, you can get back to it below:
Perl Script Installation