Bill Jonas on Thu, 11 Jul 2002 15:53:59 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Program permission


On Thu, Jul 11, 2002 at 03:40:08PM -0400, Greg Lopp wrote:
> Don't bother to take them away first and just do 
> "chmod u=rx targetname" instead. 

That leaves group and other permissions unchanged.

> Confessed ignorance : What are the limitations of the 
> "chmod [OPTION]... MODE[,MODE]... FILE..." notation?

Clunkiness.  Compare:

$ chmod a=r,u+w test

$ chmod 644 test

These are equivalent from a perspective that asks, "What is the
outcome?"  However, with the former you more than double the amount of
characters in the permission string as well as use odd, hard-to-reach,
(relatively) out-of-the-way characters.  (The former was the most
compact symbolic way to represent it that I could think of.  Please let
me know if there's a shorter way to express that.)

Clearly, you don't *need* to use octal permission values; everything
that can be done with an octal permission string can be done with a
symbolic permission string.  Many people find it easier and faster to
use octal; some don't.  That's fine.  Also, bear in mind that you don't
need to choose between one and the other.  I primarily use octal since I
usually want to set the permissions *to* a specific value, all three
sets at once, but I *occasionally* use the symbolic method as well when
I want to simply modify the permissions, either one set, or more than
one all the same way.  I've been doing that less and less, though.

-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/
"They that can give up  essential  liberty to obtain a little temporary
safety deserve neither liberty nor safety."        -- Benjamin Franklin

Attachment: pgpxkRCzlCEz8.pgp
Description: PGP signature