bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "cp --no-preserve=mode" doesn't work as-expected


From: Matt Griswold
Subject: Re: "cp --no-preserve=mode" doesn't work as-expected
Date: Fri, 25 Apr 2008 16:55:29 -0500

* Jim Meyering <address@hidden> [080425 16:19]:
> However, this doesn't work how I would expect:
> 
>     $ ./cp -a --no-preserve=mode c c2; ls -glo c c2
>     -rwx------ 1 85048 Apr 25 23:14 c*
>     -rwxrw-rw- 1 85048 Apr 25 23:14 c2*
> 
> As you can see, the existing tests can be improved on this front.

Oops, you're correct, I didn't delve into how the omitted_permissions
fit in, I just assumed make check would catch that sort of thing :)

That said, moving the 'omitted_permissions =' statement to the line
above instead of below 'dst_mode_bits =' so it doesn't overwrite the
permissions that are umask'd off solves that.  Alternatively, it might
be better to just manually umask dst_mode_bits right there.

Obviously better permissions testing is in order before patching this
in, if I get some time next week I'll see what I can add.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]