Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File ownership anomalies #3

Closed
rr- opened this issue Mar 16, 2018 · 2 comments · Fixed by #5
Closed

File ownership anomalies #3

rr- opened this issue Mar 16, 2018 · 2 comments · Fixed by #5

Comments

@rr-
Copy link
Contributor

rr- commented Mar 16, 2018

First I create two test directories and bind one to another:

rr-@tornado:~$ mkdir a b
rr-@tornado:~$ fuse_xattrs -o allow_other a b

I create a file as my user:

rr-@tornado:~$ echo test >b/my_file

I create a file as root:

rr-@tornado:~$ sudo su
[sudo] password for rr-:
root@tornado:/home/rr-$ echo test2 >b/root_file
root@tornado:/home/rr-$

Let's examine ownership:

rr-@tornado:~$ la b
total 8
-rw-r--r-- 1 rr- rr- 5 Mar 16 21:13 my_file
-rw-r--r-- 1 rr- rr- 6 Mar 16 21:13 root_file

Both are owned by the user that mounted the directory.

If I repeat the steps in the source directory, I get expected ownership:

rr-@tornado:~$ cd a
rr-@tornado:~/a$ rm my_file root_file
rr-@tornado:~/a$ touch my_file
rr-@tornado:~/a$ sudo touch root_file
rr-@tornado:~/a$ la
total 0
-rw-r--r-- 1 rr-  rr-  0 Mar 16 21:17 my_file
-rw-r--r-- 1 root root 0 Mar 16 21:17 root_file
@rr- rr- changed the title /etc/fstab ownership anomalies File ownership anomalies Mar 16, 2018
@rr-
Copy link
Contributor Author

rr- commented Mar 16, 2018

The solution is to apply UID and GID for newly created files based on fuse_context.

passthrough.c which seems to be taken directly from libfuse examples doesn't do that.

@ecdlguy
Copy link

ecdlguy commented Aug 2, 2019

@fbarriga Is this project dead? Please merge the pull requests and release. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants