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

relaxed_permissions not working on Ubuntu 22.04 #121

Open
majorandras74 opened this issue May 21, 2022 · 4 comments
Open

relaxed_permissions not working on Ubuntu 22.04 #121

majorandras74 opened this issue May 21, 2022 · 4 comments

Comments

@majorandras74
Copy link

Hello!

I use the Unionfs-fuse solution to separate static data from data generated during the game (save, score, setting, etc.) for games running over an emulator. In the past, there was a problem that caused the file created when writing to union to get stuck in the permission check (it was virtually 0 bytes in size and no permission bits were set to it (000)). This is solved by the "relaxed_permissions" option. Unfortunately, the problem came back when I switched to the latest Ubuntu release, 22.04. It's like the "relaxed_permissions" option doesn't work for some reason. Can you see what the problem might be? If you write what data you need I will try to provide it. Until then:

unionfs-fuse version: 2.3
(compiled with xattr support)
FUSE library version 3.10.5
using FUSE kernel interface version 7.31
fusermount3 version: 3.10.5

Thanks

@bsbernd
Copy link
Contributor

bsbernd commented May 23, 2022

I just updated one of my systems yesterday night, will test it in the evening today.

@rpodgorny
Copy link
Owner

rpodgorny commented Jul 3, 2022

please try again with the current (3.1 as of now) version, thanks!

@majorandras74
Copy link
Author

Hello!

Tried with the latest version, but unfortunately the situation is unchanged.

unionfs-fuse version: 3.2
(compiled with xattr support)
FUSE library version 3.10.5
using FUSE kernel interface version 7.31
fusermount3 version: 3.10.5

Bye

@bsbernd
Copy link
Contributor

bsbernd commented Aug 12, 2022

It actually works as expected and would be unsual if not - this is a kernel fuse feature - by default we add in "default_permissions", which makes the kernel to verify if you are allowed to access a file. "relaxed_permissions" removes "default_permissions", unless started as root, this option is then ignored for security reasons.

Example

total 12K
drwxr-xr-x 2 bernd bernd 4.0K Aug 12 20:04 over
drwxr-xr-x 2 bernd bernd 4.0K Aug 12 20:02 root
drwxr-xr-x 2 bernd bernd 4.0K Aug 12 20:00 union
bernd@t420-work-1 unionfs>ll root/
total 4.0K
-rw-r--r-- 1 root root 5 Aug 12 20:02 file

bernd@t420-work-1 unionfs>ll over/
total 0
  1. Without relaxed permission

unionfs -d -o allow_other,use_ino,nonempty,cow over=RW:root=ro union/
(-d for debug output and runs in foreground)

Other shell:

bernd@t420-work-1 unionfs>echo 1234 >union/file
bash: union/file: Permission denied
  1. With relaxec permission
bernd@t420-work-1 unionfs>unionfs -d -o allow_other,use_ino,nonempty,cow,relaxed_permissions over=RW:root=ro union/

Other shell:

bernd@t420-work-1 unionfs>echo 1234 >union/file
bernd@t420-work-1 unionfs>

and this creates

bernd@t420-work-1 unionfs>ll over/
total 4.0K
-rw-r--r-- 1 bernd bernd 5 Aug 12 20:12 file

Hence, the feature works as expected.

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

No branches or pull requests

3 participants