From owner-freebsd-questions Thu Dec 6 4:22:45 2001 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id 751B837B405 for ; Thu, 6 Dec 2001 04:22:36 -0800 (PST) Received: from [212.238.194.207] (helo=tanya.raggedclown.net) by post.mail.nl.demon.net with esmtp (Exim 3.33 #1) id 16BxXu-0007HH-00 for freebsd-questions@freebsd.org; Thu, 06 Dec 2001 12:22:34 +0000 Received: by tanya.raggedclown.net (tanya.raggedclown.net, from userid 500) id 6BB26111E; Thu, 6 Dec 2001 13:22:33 +0100 (CET) Date: Thu, 6 Dec 2001 13:22:33 +0100 From: Cliff Sarginson To: FreeBSD Questions Subject: Re: Modifying only certain bits with chmod Message-ID: <20011206122233.GB1111@raggedclown.net> References: <009101c17c12$649fe2e0$0a00000a@atkielski.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.24i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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