GNU bug report logs -
#27269
Sed --in-place is messing NTFS file permissions
Previous Next
Full log
Message #14 received at 27269 <at> debbugs.gnu.org (full text, mbox):
On Wed, Nov 15, 2017 at 2:43 AM, Assaf Gordon <assafgordon <at> gmail.com> wrote:
...
> 3.
> If ACL support is compiled in sed, using "--in-place"
> leads to the following syscalls:
>
> fchown(4, 1000, 1000) = 0
> fgetxattr(3, "system.posix_acl_access", "", 132) = 0
> fstat(3, {st_mode=S_IFREG|0664, st_size=6, ...}) = 0
> fsetxattr(4, "system.posix_acl_access", "\2\0\0\0\37....", 28, 0) = 0
> close(3) = 0
> close(4) = 0
> rename("world", "world.bak") = 0
> rename("./sedcrOmKi", "world") = 0
>
> 4.
> If ACL support is not compiled in sed, using "--in-place"
> leads to the following syscalls:
>
> fchown(4, 1000, 1000) = 0
> fchmod(4, 0100664) = 0
> close(3) = 0
> close(4) = 0
> rename("world", "world.bak") = 0
> rename("./sednDUqpF", "world") = 0
>
>
> One can perhaps infer that fsetxattr/fgetxattr do not work on NTFS
> mounts, but also don't fail with ENOTSUP.
...
> Is this a bug?
> and if so, is it in sed or gnulib or libacl ?
> Not sure about this.
Hi Assaf,
Thank you for the thorough analysis.
Following your instructions in https://debbugs.gnu.org/27269#8, I
reproduced the failure on Fedora 26 with Linux 4.13.12.
That looks like either we're somehow telling f[gs]etxattr to do the
wrong thing, or it's a bug that they fail to do what we want, yet they
return 0/success.
This bug report was last modified 6 years and 340 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.