bids-standard / bids-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/bids-validator/
MIT License
181 stars 109 forks source link

[Code 26] NIFTI_HEADER_UNREADABLE with symlinks #643

Closed chrisgorgo closed 5 years ago

chrisgorgo commented 5 years ago

See https://neurostars.org/t/code-26-nifti-header-unreadable/2783 for context.

This sounds like a regression - symlinked datasets used to work.

chrisgorgo commented 5 years ago

@olgn could you have a look?

nellh commented 5 years ago

The browser doesn't expose symlinks to web apps, so that seems unlikely.

Maybe the original symlinks are broken or can't be read for the browser? I get this error if I symlink to an NFS mounted nii.gz file that I don't actually have permission to read, for example.

olgn commented 5 years ago

I can replicate this error in the manner that @nellh said (permissions error on symlink) - which should raise an error. This permissions error results in NIFTI_HEADER_UNREADABLE in the browser but a FILE_READ in node, but I think this is due to the difference in file read methods for the different environments.

I have tested bids-validator 1.2.1 in node and browser on datasets with properly formatted / permissioned symlinks, and the validator works as expected in both environments.