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

Mounted filesystem gets root:root ownership #61

Closed
a-wai opened this issue Sep 12, 2018 · 2 comments
Closed

Mounted filesystem gets root:root ownership #61

a-wai opened this issue Sep 12, 2018 · 2 comments
Assignees

Comments

@a-wai
Copy link
Contributor

a-wai commented Sep 12, 2018

Issue occurred on Debian Stretch, with libfuse 2.9.7

When mounting an APFS filesystem with apfs-fuse, the whole filesystem's uid and gid are set to 0 (root ownership). This can prevent a regular user from accessing some files, or to use an overlayfs on top of an APFS filesystem.
When using the "uid=N" option to set the filesystem's user ID, fuse returns with the following message: `fuse: unknown option 'uid=N'.

This option seems not to be understood when using fuse_lowlevel_*, which means apfs-fuse has to do some option parsing to handle it.

@ajrossnz
Copy link

how do you mount as a normal user?

@sgan81
Copy link
Owner

sgan81 commented Mar 9, 2019

The newest version now allows setting of uid and gid via mount options:
Example: apfs-fuse -o uid=1000,gid=1000 <device> <mount-path>. If you mount as root and want normal users to be able to access the volume, add allow_other to the mount options.

You can only mount as a normal user if you have read access to the device. Adding yourself to the disk group is one possibility, but it is not too safe, because it allows any application to read and write anywhere on a disk.

@sgan81 sgan81 closed this as completed Mar 9, 2019
jief666 pushed a commit to jief666/apfs-fuse that referenced this issue May 21, 2019
Added support for setting uid/gid as requested and submitted by a-wai (sgan81#61).
Added utility for showing volumes in a container as requested by ogjelland (sgan81#36).
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