PermissionError: [Errno 1]


I tried to solve this problem for two days no but can’t find any solution. I hope that’s the right place to ask for help.

I’m running Docker (43472) on Windows 10 Professional.

The container (nipy/heudiconv) I’m running crashes when it has to load a .json file:

  File "/src/heudiconv/heudiconv/", line 255, in treat_infofile
       with open(filename) as f:
PermissionError: [Errno 1] Operation not permitted: ‘/base/BIDS/sub-flex1/ses-1/anat/sub-flex1_ses-1_T1w.json’

Where could this PermissionError: [Errno 1] come from?

The folder is in C:\Users\Username and is mounted like this:

docker run --rm -it -v C:\Users\Username:/base

When checking C:\ -> Properties -> Security, I have full acces to read/write in this folder. I also tried to open the file with a python script, which worked.

I had this whole thing running on an old laptop about 4-5 weeks ago. Unfortunately it has died and I’m currently trying to set it up on an new PC.

Any help would be appreciated, since I’m absolutely lost…

Had a similar problem but different scenario: VS2019 using built in docker compose, Docker

I changed all the paths in my dockerfiles to be absolute instead of relative and the error went away.

e.g. context: . became c:\myapp\src\projectfolder

Did you enable Disk access for Docker Desktop?

@ jaygiles thank you for your answer. If I get around to it again, I will try that!

@derteufelqwe Jup, I did.