torarnv / sparsebundlefs

FUSE filesystem for reading macOS sparse-bundle disk images
BSD 2-Clause "Simplified" License
330 stars 38 forks source link

Permission denied when mounting sparsebundle.dmg #11

Closed KLicheR closed 10 years ago

KLicheR commented 10 years ago

Hi,

First of all, thanks a lot for this!

My problem is that I cannot mount the .dmg file, it say:

/path/to/my/mountdir/sparsebundle.dmg: Permission denied

Here's my steps:

Then I get a /path/to/my/mountdir/sparsebundle.dmg: Permission denied.

Here's what I get when I "verbose" the mount command:

mount: enabling autoclear loopdev flag
mount: going to use the loop device /dev/loop0
/path/to/my/mountdir/sparsebundle.dmg: Permission denied
/path/to/my/mountdir/sparsebundle.dmg: Permission denied
mount: failed setting up loop device

I saw the thing about losetup but I think that I have to pass through the permissions issues before looking into that.

Do you know what I'm doing wrong?

Thanks again!

torarnv commented 10 years ago

I'm guessing there's a mismatch between the ownership of either the sparsebundle, the dmg mount dir, or the final mount dir. Try running all commands as root, or all commands as your own user (mounting to eg /tmp/foo or somewhere you have write permissions).

You can also play around with the allow_other and allow_root options to fuse:

http://manpages.ubuntu.com/manpages/precise/man8/mount.fuse.8.html

KLicheR commented 10 years ago

It worked!

I mounted my ".sparsebundle" file to a directory with this command: $ sudo sparsebundlefs -o allow_other /path/to/my/file.sparsebundle /path/to/my/mountdir

After that, I've been able to mount it with the losetup thing that you explain in the Readme.

Thanks again!

torarnv commented 10 years ago

Excellent :fireworks:

torarnv commented 6 years ago

For anyone landing here in the future, this should be clarified and fixed by 7d81b50bb8243f