Skip to content

Nondeterministic EACCES writing to file inside the mirror #120

@G3zz

Description

@G3zz

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 parent
ls -l /home/userB/parent
drwxrwx--- 2 userB userA 4096 Sept 21 15:22 parent

To 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/mountedDirectory

All 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfuse-bugMost likely a bug in a FUSE implementation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions