Path: utzoo!hoptoad!pacbell!amdahl!apple!ames!elroy!aero!sunstroke!faigin From: faigin@sunstroke.aero.org (Daniel P. Faigin) Newsgroups: alt.sources Subject: Re: chmod args (was Re: Need a "watching" program) Keywords: chmod Message-ID: <52291@aerospace.AERO.ORG> Date: 2 Jun 89 14:40:32 GMT References: <8923@csli.Stanford.EDU> <11680@s.ms.uky.edu> <8928@csli.Stanford.EDU> <12743@ihlpy.ATT.COM> <1953@ur-cc.UUCP> <2126@amelia.nas.nasa.gov> <8605@chinet.chi.il.us> Sender: news@aerospace.aero.org Reply-To: faigin@aerospace.aero.org (Daniel P. Faigin) Distribution: usa Organization: The Aerospace Corporation, El Segundo, CA Lines: 45 In article <8605@chinet.chi.il.us> ignatz@chinet.chi.il.us (Dave Ihnat) writes: >>In article <12743@ihlpy.ATT.COM> bdavies@ihlpy.UUCP (55314-Davies,B.) writes: >>Really. *I* know what you all mean, but why does everyone teach the >>octal way when these mnemonic ways exist that are so nice and easy to >>understand for everyone? Don't you all believe in abstraction? > >Actually, they still have two different and useful functions. The mnemonic >method is a mask, while using the octal is a total reset. So, the mnemonic >is simpler if I just want to toggle a particular permission; I don't need >to be sure to not destroy other bits.... >On the other hand, if I'm installing a program and have definite ideas >about the permissions I want to set, then the octal form is cleaner. RTFM Symbolic Modes A symbolic mode has the form: [ who ] op permission [ op permission ]... who is a combination of: u user's permissions g group permissions o others a all, or ugo op is one of: + to add the permission - to remove the permission = to assign the permission explicitly (all other bits for that category, owner, group, or others, will be reset). Hence, his example where he needs chmod 2710 can be written much cleaner as: chmod u=rwx,g=xs,o-rwx Daniel Work :The Aerospace Corp M8/055 * POB 92957 * LA, CA 90009-2957 * 213/336-3149 Home :8333 Columbus Avenue #17 * Sepulveda CA 91343 * 818/892-8555 Email:faigin@aerospace.aero.org (or) Faigin@dockmaster.ncsc.mil Voicemail: 213/336-5454 Box#3149 * "Take what you like, and leave the rest"