-
Notifications
You must be signed in to change notification settings - Fork 71
Description
I am using bindfs to mount some python code from a subdirectory (parent/directoryToMount) in user A's home folder to an analogous location in user B's home directory (parent/mountedDirectory). userA has the allow_other option enabled and the permissions of the parent folders are:
ls -l /home/userA/parent
drwx------ 99 userA userA 4096 Sep 21 15:12 parentls -l /home/userB/parent
drwxrwx--- 2 userB userA 4096 Sept 21 15:22 parentTo mount the subdirectory, the below is executed as userA:
mkdir -p /home/userB/parent/mountedDirectory
bindfs --perms=770 --create-with-perms=770 --mirror=userB /home/userA/parent/directoryToMount /home/userB/parent/mountedDirectoryAll seemingly works well - the Python code executes and starts to read/write/append files in the mirrored parent/mountedDirectory until after some seemingly non-deterministic amount of time, the Python program can no longer write files and receives Permission denied.
Here is an excerpt from running with strace, which shows that at some point in the loop, the Python program is no longer able to write to a file in the mountedDirectory called data.csv:
895 openat(AT_FDCWD, "data.csv", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE|O_CLOEXEC, 0666) = 16
...
895 openat(AT_FDCWD, "data.csv", O_WRONLY|O_CREAT|O_APPEND|O_LARGEFILE|O_CLOEXEC, 0666) = -1 EACCES (Permission denied)Unfortunately I am not able to share the full Python code but I'd like to check if there's anything obvious that is incorrect and any ideas on how to get more information on the problem.
Thanks