opensubscriber
   Find in this group all groups
 
Unknown more information…

b : bug-coreutils@gnu.org 5 March 2012 • 10:00PM -0500

bug#8391: chmod setuid & setguid bits
by Ondrej Vasik

REPLY TO AUTHOR
 
REPLY TO GROUP




On Fri, 2012-02-24 at 11:47 -0800, Paul Eggert wrote:
> On 02/24/2012 11:33 AM, Ondrej Vasik wrote:
> > Yes, but `chmod @755 DIR' approach will not let you to write a script
> > which will work without modification on RHEL-4,RHEL-5 and RHEL-6
> > machine...
>
> None of these approaches will let you write a script that will work
> without modification on any POSIX platform.  If one wants to be portable,
> one must use the symbolic notation, not the octal.
>
> None of these approaches will even let you write a script that will work
> without modification on any RHEL platform.  This is because some RHEL
> platforms use the newer coreutils.
>
> Still, I take your point that the 5-or-more-digit approach will let you write
> scripts that will run on all POSIX platforms without a diagnostic
> (though perhaps not with the desired effect).  And these scripts will
> run and have the desired effect if you know that your scripts will run
> only on a particular subset of POSIX platforms, one where the effect is
> the one desired.
>
> How about this idea for a compromise?  Implement both notations, but
> recommend leading '@' for future scripts.  It's more likely that a notation
> like leading-'@' would be adopted by future POSIX versions, since it's a
> pure extension, whereas the 5-or-more-digit approach is incompatible with
> some POSIX systems now.  And if leading-'@' is adopted by POSIX, there would
> eventually be a portable way to do what the requester wants.
>
> Personally I'd be more inclined to go with a pure '@' solution, since
> it's simpler and the portability gains of the compromise are not all
> that great; but I guess the compromise would be OK too.

Hi,
both notations implemented via changing gnulib modechange. I didn't add
the recommendation for leading '@' yet, as this part will probably need
some rewording to better match the standards of coreutils texinfo
perm.texi documentation anyway and I don't know how this should be
properly written.

Both patches (one for gnulib, one for coreutils documentation and
testsuite) attached.

Greetings,
          Ondrej Vasik

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.