can't access specific files in bindfs mount

1

I'm using Arch Linux on a Mac and therefore use hfsprogs to access my hfs+-partitions. Since the permissions on the files on my Mac partitions are set to my Mac user, I can't read or write those partitions with my Arch Linux user. To address this problem, I use a bindfs mount like this:

bindfs -u $(id -u) -g $(id -g) /mnt/mac-hdd-orig /mnt/mac-hdd

Run as my normal user, /mnt/mac-hdd-orig is the mountpoint of my Mac hdd:

/dev/sda2 on /mnt/mac-hdd-orig type hfsplus (rw,relatime,umask=22,uid=0,gid=0,nls=utf8)

This results in the following mount point:

/mnt/mac-hdd-orig on /mnt/mac-hdd type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000,default_permissions,allow_other)

This works fine for most files, but however, there are certain directories I can't access in the bind mount, although their permissions don't differ from other files / directories:

Accessing /mnt/mac-hdd/Users/username/Bitcoin/ works fine in the bind-mount:

ls -ahl /mnt/mac-hdd/Users/username/Bitcoin/|head -n 7
total 3,8M
drwxr-xr-x 1 1000 1000   12  6. Jan 02:26 .
drwxr-xr-x 1 1000 1000   10 11. Jan 02:13 ..
-rw------- 1 1000 1000   37  8. Sep 00:39 banlist.dat
drwx------ 1 1000 1000 1,3K 25. Sep 21:21 blocks
drwx------ 1 1000 1000  857 26. Sep 09:51 chainstate
-rw------- 1 1000 1000    0  8. Sep 00:37 db.log
[...]

But however, I can't access any files or directories in that directory, even as root:

sudo cat /mnt/mac-hdd/Users/username/Bitcoin/db.log
     cat: /mnt/mac-hdd/Users/username/Bitcoin/db.log: Permission denied

sudo ls -ahl /mnt/mac-hdd/Users/username/Bitcoin/blocks/
     ls: reading directory '/mnt/mac-hdd/Users/username/Bitcoin/blocks/': Permission denied
     total 0

What's wrong with my bindfs-mount? Other directories work fine. The original mount lists that directory as follows:

sudo ls -ahl /mnt/mac-hdd-orig/Users/username/Bitcoin/|head -n 7
total 3.8M
drwxr-xr-x 1 501 utmp   12 Jan  6 02:26 .
drwxr-xr-x 1 501   80   10 Jan 11 02:13 ..
-rw------- 1 501 utmp   37 Sep  8 00:39 banlist.dat
drwx------ 1 501 utmp 1.3K Sep 25 21:21 blocks
drwx------ 1 501 utmp  857 Sep 26 09:51 chainstate
-rw------- 1 501 utmp    0 Sep  8 00:37 db.log
[...]

and:

sudo ls -ahl /mnt/mac-hdd-orig/Users/username/Bitcoin/blocks|head -n 5
total 90G
drwx------ 1 501 utmp 1.3K Sep 25 21:21 .
drwxr-xr-x 1 501 utmp   12 Jan  6 02:26 ..
-rw------- 1 501 utmp 128M Sep  8 00:47 blk00000.dat
-rw------- 1 501 utmp 128M Sep  8 00:48 blk00001.dat
[...]

chmod -R g+r /mnt/mac-hdd-orig/Users/username/Bitcoin/ didn't help. chmod -R o+r /mnt/mac-hdd-orig/Users/username/Bitcoin/ did result in the following strange result:

sudo ls -ahl /mnt/mac-hdd/Users/username/Bitcoin/blocks|head -n 5
total 0
drwxr--r-- 1 1000 1000 1.3K Sep 25 21:21 .
drwxr-xr-x 1 1000 1000   12 Jan  6 02:26 ..
-????????? ? ?     ?        ?            ? blk00000.dat
-????????? ? ?     ?        ?            ? blk00001.dat

Any ideas what could fix that problem? I appreciate any help a lot!

LukeLR

Posted 2017-03-05T15:30:45.733

Reputation: 1 233

No answers