On 2023-09-01 08:09, Bruno Haible wrote: > It applies to all 4 variants, as can be seen from applying it to a directory: > > $ ./a.out /media/nas/bruno/dir1 > lchown: Permission denied > fchownat: Permission denied > chown: Permission denied > fchown: Permission denied Thanks, for coreutils it'd be helpful to now whether there's a similar problem with chmod-related syscalls. If you compile and run the attached program on a file that you don't own (e.g., './a.out /'), does it incorrectly issue "Permission denied" instead of "Operation not permitted" diagnostics?