Text
CHMOD

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfreeforum.org Forum Index -> A detailed list of common computer words
View previous topic :: View next topic  
Author Message
Please Register and Login to this forum to stop seeing this advertsing.





Add Karma

Posted:     Post subject:

Back to top
symon
Site Admin
Site Admin

Location: 

Joined: 13 Mar 2006
Posts: 866


Location: Hampshire Add Karma

PostPosted: Sun Apr 23, 2006 7:59 pm    Post subject: CHMOD Reply with quote


CHMOD Permissions Settings - Definitions and Overview
To change a file or directory's permissions, use the UNIX 'chmod' command
(which actually stands for 'change mode').


CHMOD Permissions Settings
Permissions Settings - Definitions and Overview


In order for your CGI program to run, it must be executable by the server. Therefore, you must set the permissions so the server can read or execute your files, which usually means making your CGI programs world executable. The way you set your file permissions is by using the CHMOD commands.


The CHMOD's permission mask is a three-digit number. Each digit of the number defines the permission for a different user of the file. The first digit defines the permission for the owner, the second digit defines the permissions for the group and the third digit defines the permissions for everyone else (referred to by CuteFTP as public). Each digit works the same for each group of users: the owner, group, and public. What you set for one digit has no effect on the other two digits.

  • Owner = the files users (you)
  • Group = the files group
  • Others = others


Permissions Definitions:

  • r = read access
  • x = execute access
  • w = write access


Numerical Definitions:

  • r = 4
  • x = 2
  • w = 1



You will come to recognize, if you do not already, Chmod as a word used for changing Permissions from within Telnet or your FTP client.

Some scripts will tell you to chmod 775 (for example). When using the numeric system, the code for permissions is as follows:

4 + 2 + 1 (rwx) = 7


The first number applies to Owner, the second number applies to Group, and the third number applies to Others. Therefore the first 7 of the chmod 775 tells Unix to change the Owner's permissions to rxw (because r=4 + w=2 + x=1 adds up to 7, this giving the Owner Read, Write, and Execute Permission. The second 7 applies to the group, this giving the Group Read, Write, and Execute Permission, and the last number 5, refers to Others (4 + 1= 5), giving Others only Read and Execute Permission. The permissions for chmod 775 look like this: rwx rwx -rx.

Permissions are always broken up into three groups of letters, however if there is a dash, this dash simply means that Permission wasn't given for that particular function, for example in the chmod 775, Permission to Write was not given to Others.

Remember: the first 3 letters always apply to Owner, the second 3 apply to Group, and the third 3 apply to Others.


CHMOD and File Permission Settings
400r--------files (won't let you accidently erase)
444r--r--r--files (lets everyone read
600rw-------files (no one else can read or see files
644rw-r--r--files (getting the idea?)
664rw-rw-r--files
666rw-rw-rw-files, (note: this could allow havoc of satanic proportions)
700rwx------programs and directories
750rwxr-x---programs and directories
755rwxr-xr-xprograms and directories
777rwxrwxrwxprograms and directories
Note: 777 will produce a wide open executable script, this is dangerous!



Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    howtodoit.myfreeforum.org Forum Index -> A detailed list of common computer words All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
HOWTODOIT was designed and built by Symon Field
Creator Of ☆ FarnboroughInvinciblesAgonyAuntFairiesAsylum Alliance FunnyWorldHOWTODOIT PHPbb3
HOWTODOIT© Symon Field 2006,2007,2008

Powered by phpBB Group © 2001,2005.
 

Create your own free forum | Buy a domain to use with your forum