From: archangl@l0pht.com Subject: Archangel's UNIX primer (cd and chmod) Archangel's explanation of cd and chmod Like most things that I post to newsgroups, these will not be archived, so don't come to me later asking for a copy. It is very difficult for a newbie to wade through UNIX. This is the second half of the Archangel's primer series. Now that I have given you a list of UNIX commands to work from, I will now go through the list with a more detailed explanation of each command. If you are a newbie, or anyone who has never dealt with UNIX before. I hope that this UNIX primer series will have you better armed the next time you find yourself dealing with a UNIX system. cd The cd command simply changes the directory. If you are familiar with Dos, you should already be aware of what this command does. It is actually a built in shell command. Just play with it if you are still confused. chmod Changes the access mode of one or more files. Only the owner of a file or a priviledged user may change it's mode. Create mode by concatenating (stringing together) the characters from who, opcode, and permission. Who is optional (default is a), and only one opcode is allowed. Option -R recursively descend directory arguments while setting modes Who u User g Group o Other a All (default) Opcode + Add permission - Remove permission = Assign permission (removes permission of unspecified fields) Permission r Read w Write x Execute s Set user or group ID t Stick bit, save text or prevent removal of files by nonowners u user's permission g group's permission o other's permission l Mandatory locking You may also specify permissions with a three digit sequence. If you like shorthand, this is the way to go. The first digit is the owner permission, the second is the group permission, and the third is other's permission Permissions are figured by the following values (octal) 4 Read 2 Write 1 Execute A fourth digit may precede the three digit number, and assigns these modes: 4 Setup user id on execution 2 Set group id on execution or mandatory locking 1 set the sticky bit Enough yet? Go ahead and read it all again if it was too confusing. I've made up a few examples to help you get it. Trust me, once you use it, you'll be slinging chmods like a pro! EXAMPLES: Add execute-by-user permission to file "archangl" chmod u+x archangl Either of the following examples will assign read-write-execute permission by owner (7), read-execute permission by group (5), and execute-only permission by others (1) to file "archangl" chmod 751 archangl chmod u=rwx, g=rx, o=x archangl Any one of the following will assign read-only permission to file "archangl" for everyone. chmod =r archangl chmod 444 archangl chmod a-wx, a+r archangl Set the user id, assign read-write-execute permission by owner, and assign read-execute permission by group and others: chmod 4755 archangl This command is not as confusing as it first appears. Just play with it a few times, and you'll be able to do it in your sleep. Archangel Wrath of God Hand Delivered http://l0pht.com/~archangl -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading