Welcome to WebmasterWorld Guest from 54.145.208.64

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

What does CHMOD mean/ stand for?

   
1:23 am on Mar 29, 2005 (gmt 0)

10+ Year Member



Please remember I am new to this :)
What does
' CHMOD this folder 0777 ' mean :)

Maybe a silly question but it is the first time I have come across this

thanks in advance
Brijay

1:42 am on Mar 29, 2005 (gmt 0)

10+ Year Member



CHMOD = CHange MODe
1:52 am on Mar 29, 2005 (gmt 0)

10+ Year Member



brijay -- are you referring to the definition or the act? To CHMOD a directory or file on a server you need to change the permissions for that directory/file. 777 means (if I remember correctly) that everyone can read, write and execute that directory/file.
3:29 am on Mar 29, 2005 (gmt 0)

WebmasterWorld Senior Member wheel is a WebmasterWorld Top Contributor of All Time 10+ Year Member



chmod is the change mode command, as indicated above.

The 777 indicates the permissions. there are three groups of people who can have permissions (each one gets their own digit), in order: Owner (of the file or directory, the first 7), group (everyone who belongs to the same group as the owner, second 7), and world (third 7).

Owner is the user of the file - that'd be you. In the *nix world, users belong to groups. So you might be user/owner Bob in group Marketing. This model lets you do things like say Bob can read/write the file, the rest of marketing can only read the file, and other users can read the file.

Each digit in the 777 is a binary representation of:
rwx (read/write/execute). So a chmod of 755 means:
111(7) - Owner can read write execute
101(5) - other in the group can execute or read, no write
101(5) - rest of world can read and execute, no write.

That setup means you can read/write and execute your files, but the people visiting your site can only read or execute the file. Thus you need to set programs in your cgi-bin to 755, so people can execute the file as a program.

If you set the permissions to 'chmod 644', you get a file that can be written by you, but can only be read by the rest of the world. This is good for straight HTML files so that no hanky panky goes on. But try and execute a file with permissions of 644 and you'll get an error.

The first 0 in the 0777 isn't normally used on websites, you can just worry about the last three digits.

3:31 am on Mar 29, 2005 (gmt 0)

WebmasterWorld Senior Member wheel is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Correct me if I'm wrong, but I think at most you want to chmod the directory to 755 (directories have permissions too). Chmod 777 can be done, but it can be unsafe.
10:22 am on Mar 30, 2005 (gmt 0)

10+ Year Member



OK
Well have to say I am still confused, maybe I am a little out of my depth.
I had intentions of adding a program to my website that I downloaded called 'Link Management assistant' started following the intructions until it told me to 'chmod this folder 0777' and obviously I had no idea of what that meant.
Now I understand what you are all saying it means but I have no idea of how to do it.
Am I just out of my depth here or is this simple to do and I am just overlooking it :)

Thanks again in advance
Brijay

10:38 am on Mar 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Now I understand what you are all saying it means but I have no idea of how to do it.

Your host may provide you some means by which to change directory permissions (some do, some don't). This may be a via a browser based file management system or through a regular FTP programme.

If you don't have these options (check your hosts FAQs, etc) then usually you can just fire off an email to your host asking them to change the directory permissions. If you are only wanting a temporary change (for installation purposes) then you should arrange a time / method to let your host know to change the permissions back.

Scott

1:53 pm on Mar 30, 2005 (gmt 0)

10+ Year Member



Thankyou for your help, I have just found where I can change the permissions so hopefully it is full steam ahead from here

Thanks again to all for your advice.
Brijay

5:29 pm on Mar 30, 2005 (gmt 0)

10+ Year Member



Chmod 777 can be done, but it can be unsafe.

And for security reasons, some hosts will not allow permissions higher than 755. If you can't get anything to work when you chmod a file or directory to 777, try 755.

TLDP.org has a nice, plain-language explanation of the more common permission levels: http://www.tldp.org/LDP/intro-linux/html/sect_03_04.html#AEN2862 [tldp.org]