proot icon indicating copy to clipboard operation
proot copied to clipboard

fchmodat2 not supported

Open the-sun-will-rise-tomorrow opened this issue 5 months ago • 0 comments

Expected Behavior

The fchmodat2 system call, added in Linux 6.6, should be captured.

Actual Behavior

The fchmodat2 system call does not seem to be supported right now.

Steps to Reproduce the Problem

  1. Install GNU coreutils 9.5 or newer
  2. Try running cp -r /some/source/directory /some/target/directory under proot, on a Linux kernel which supports the fchmodat2 system call

This will produce the nonsensical-looking error "cp: setting permissions for '/some/target/directory': No such file or directory".

Specifications

  • Proot/Care version: 5.4.0
  • Kernel version: 6.9.9
  • Host distribution: Nix under Arch Linux
  • Guest distribution: none (container image)

Command Output

A snippet of strace output:

newfstatat(AT_FDCWD, "/some/target/directory", 0x7fffffffd750, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
mkdirat(AT_FDCWD, "/some/target/directory", 0555) = 0
newfstatat(AT_FDCWD, "/some/target/directory", {st_mode=S_IFDIR|0555, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
fchmodat2(AT_FDCWD, "/some/target/directory", 040755, AT_SYMLINK_NOFOLLOW) = -1 ENOENT (No such file or directory)
write(2, "/nix/store/php4qidg2bxzmm79vpri0"..., 66/nix/store/php4qidg2bxzmm79vpri025bqi0fa889-coreutils-9.5/bin/cp: ) = 66
write(2, "setting permissions for '/home/s"..., 44setting permissions for '/some/target/directory') = 44
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
)                       = 1
lseek(0, 0, SEEK_CUR)                   = 0
close(0)                                = 0
close(1)                                = 0
close(2)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++