[Bug 204093] perl -i resets file ACLs and EAs

bugzilla at redhat.com bugzilla at redhat.com
Fri Nov 28 17:53:15 UTC 2008


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=204093


Stepan Kasal <skasal at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |CLOSED
         Resolution|                            |NOTABUG




--- Comment #6 from Stepan Kasal <skasal at redhat.com>  2008-11-28 12:53:14 EDT ---
(In reply to comment #5)
> The reasoning in comment #4 is not correct.

You are right.

Both perl and GNU sed do set the mode of the new file according to the original
one.  If the command is executed under root, they also change the ownership
according to the original file.

Moreover "perl -i" sets the suid bits according to the original (even if run
under ordinary user, when the ownership of the file cannot be preserved).

GNU sed -i does not copy the suid bits.

> So perl goes the extra mile to leave the resulting file in a state as close to
> the original.

Correct.

> It should do so with ACLs and EAs as well.

IOW, you propose that perl should strive to preserve all settable attributes of
all possible underlying file systems.  I'd consider such a quest very futile.

OTOH, shouldn't we consider removing the mode/owner setting code to prevent the
confusion by half-done work?

It is not clear to me which of these changes (if any) is better, I cannot
accept the position that the current behaviour is a bug.  Instead, I tend to
consider the proposal and an enhancement request.  Feel free to submit it to
perlbug at perl.org.

I do not think it would be wise for Fedora to diverge from upstream in this
case.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.




More information about the Fedora-perl-devel-list mailing list