chmod args (was Re: Need a "watching" program)

Daniel P. Faigin faigin at sunstroke.aero.org
Sat Jun 3 00:40:32 AEST 1989


In article <8605 at chinet.chi.il.us> ignatz at chinet.chi.il.us (Dave Ihnat) writes:
>>In article <12743 at ihlpy.ATT.COM> bdavies at 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 at aerospace.aero.org (or) Faigin at dockmaster.ncsc.mil               
Voicemail: 213/336-5454 Box#3149 * "Take what you like, and leave the rest"   



More information about the Alt.sources mailing list