On 2023-09-02 04:18, Bruno Haible wrote: > chmod fails with EACCES, hence per POSIX > > it's buggy. Thanks, I reported the bug with chmod, chown, etc. to the linux-cifs mailing list, here: https://lore.kernel.org/linux-cifs/fe8ab586-c697-583b-650d-3adac64df7b2@cs.ucla.edu/T/#u I did some testing with fsetxattr and found that it has a similar issue even with ext4; for example, setxattr("/", "a", "b", 1, 0) fails with EACCES. This is not a POSIX violation, since POSIX lacks setxattr. However it's bad form. And it means coreutils needs the attached workaround not just for CIFS, but also for ext4 in some (rare) cases. I installed the attached workaround on coreutils and am closing the bug report. Thanks again for mentioning it.