[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65599: mv and cp give a pointless warning when moving/copying a dire
From: |
Paul Eggert |
Subject: |
bug#65599: mv and cp give a pointless warning when moving/copying a directory |
Date: |
Wed, 30 Aug 2023 21:58:33 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 |
On 2023-08-29 11:20, Bruno Haible wrote:
People say that "chown only works for root anyway" [1]
I don't think that is the issue here. fchownat is failing with EACCES,
which is supposed to mean that search permission is denied on a
component of the path prefix, but in Android I guess EACCES also means
the calling process doesn't have the required permissions to change
ownership (i.e., errno should be EPERM according to POSIX).
Clearly search permission is allowed, since there's a successful
utimensat call with the same file name. So EACCES does not mean search
permission is denied; it means something else.
Do fchown, chown, and lchown have similar bugs on Android?
Although the attached hacky coreutils patch (which I haven't installed)
might solve the immediate problem, it sounds like this is something that
Gnulib's fchownat (and maybe related modules) should fix on Android, so
that the fix is everywhere and not just in mv+cp.
android.diff
Description: Text Data