dvalters / fuse-netcdf

ESoWC project to develop a Python utility to mount NetCDF files as a file-system in user space. (FUSE)
Other
8 stars 3 forks source link

cannot view mounted directory #8

Closed blazk closed 6 years ago

blazk commented 6 years ago

Hi Declan, I've tried to mount a file (ERA-40 NetCDF) and it seems to be mounted

-rw-r--r-- 1 ma9 ma 22165040 Jun 21 10:49 ECMWF_ERA-40_subset.nc
d????????? ? ?   ?         ?            ? era

but when I try to list the directory I get an error

ls: cannot access 'era': Bad address
dvalters commented 6 years ago

Hi Blazej,

I have just noticed a similar problem when running this on my computer at work. (I've been doing most of the development on my personal laptop prior to this.)

I think it is related to how the FUSE driver is set up/configured. I will have to do some more investigation. I have a feeling it is related to the config file in /etc/fuse.conf which has to have the user_allow_other line uncommented to work.

In debug mode I get the following error:

fusermount: failed to chdir to /home/dvalters/dev/fuse-netcdf/trial: Permission denied

(But I will need to double check how I have this set up on my laptop first to verify this.)

blazk commented 6 years ago

I'm not convinced it is about user_allow_other. According to the documentation, this config option allows one to specify "allow_other" mount option (sounds convoluted..). Without "allow_other" mount option only me would be able to read mounted filesystem - which is fine. Problem is even I don't seem to be able to read the filesystem I have mounted. I have been mounting other FUSE-based filesystems on my desktop (sshfs, encfs...) and did not have this problem. I have no idea what else could it be though...

dvalters commented 6 years ago

Which version of Python are you using?

blazk commented 6 years ago

I've been using 2.7.12

dvalters commented 6 years ago

Ah OK - It is working at this older commit https://github.com/dvalters/fuse-netcdf/tree/53fd81bf1a1f70b8cdeeaaec7501e2f8f7710fa1 (with Python 2.7) so it must be something I've introduced since then. I will investigate further.

Edit: version here is: Python 2.7.5

blazk commented 6 years ago

ok, thanks, with this older version I can mount and list the contents of the directory (although there are some "bad address" errors and cannot inspect file content).

It's amazing to actually see NetCDF dataset as a directory, great job!!!