Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2001 13:22:33 +0100
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: Modifying only certain bits with chmod
Message-ID:  <20011206122233.GB1111@raggedclown.net>
In-Reply-To: <Pine.GSO.4.31.0112061049360.6883-100000@mail.ilrt.bris.ac.uk>
References:  <009101c17c12$649fe2e0$0a00000a@atkielski.com> <Pine.GSO.4.31.0112061049360.6883-100000@mail.ilrt.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 06, 2001 at 10:51:28AM +0000, Jan Grant wrote:
> On Mon, 3 Dec 2001, Anthony Atkielski wrote:
> 
> > I ended up modifying the command, which was easier (for me) than memorizing the
> > symbolic syntax.
> 
> ...
> 
> > So ... what's the safest way to make this my system-wide command
> > without interfering with the standard chmod source and stuff?  I
> > guess I could just copy the modified binary over to bin, no?  What
> > do most people do when they develop their own local custom versions
> > of a command?
> 
> Minimum impact: stick it in /usr/local/bin and ensure that that
> directory comes before /bin on your path.
> 
And pray nothing else that depends on standard chmod doesn't try to use
it.
If you are going to do this kind of thing you really should not do it
in such a way that the "real" system program you are replacing is not
somehow called if the caller expects it. For example, front-ending "rm"
with a safe version which saves the rm'ed files somewhere - a common practise - is
one thing. But to change the command line functionality of a standard
system program is quite another.
Sounds like a very bad move.
Give it another name.
All a mystery to me, you don't need to be Albert Einstein to learn the 
symbolic arguments for changing particular modes on a file.
Write a little crib-sheet on the back of a postit if it's that
difficult.

-- 
Regards
Cliff



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011206122233.GB1111>