Le 12466ième jour après Epoch, Michael Stone écrivait: > On Wed, Feb 18, 2004 at 11:50:27PM +1100, Russell Coker wrote: >> The other way of doing it properly is to write a program that open's >> each file, calls fstat() to check the UID/GID, then uses fchown() or >> fchmod(). >> >> It would be nice if someone was to patch the -R option of >> chown/chgrp/chmod in coreutils to do this sort of thing. > > To do what? The logic rapidly gets too complex for the command line, > imo. (chown --only-if-uid-isn't-root? chown --onlyuids=1000-1009?)
I've not read the full thread, but why not use the command: su "owner-of-the-file" -c chmod some+args the-file in the script? So no critical race condition, no hardlink problems, etc. ??? Maybe I'm wrong, correct me in this case. -- "I'd love to go out with you, but it's my parakeet's bowling night." -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]