labsyspharm / mcmicro

Multiple-choice microscopy pipeline
https://mcmicro.org/
MIT License
110 stars 58 forks source link

Windows Remote Drive Issue: Failing to create symbolic link : Operation not permitted #506

Open josenimo opened 1 year ago

josenimo commented 1 year ago

Dear MCMICRO developers,

I am trying to run MCMICRO in my windows machine, through the WSL subsystem, and it is creating some permission problems. I am now just trying to run the Exemplar_001, however it runs into an error executing ashlar.

The folder seems a bit confusing, because I manually downloaded the files, and then tried with downloading the files though nextflow.. but that also did not work.

I was able however to run Exemplar 001 on the C: drive, so I assume the problem is with the external drives, any windows users there could help me? @kbestak

What could cause this symbolic link permission issue??

Thank you in advance :)

(base) josenimo@CMP04477:/mnt/x/Jose_Imaging_Data/Exemplar_001$ nextflow run labsyspharm/mcmicro --in exemplar-001
N E X T F L O W  ~  version 22.10.3
Launching `https://github.com/labsyspharm/mcmicro` [hungry_agnesi] DSL2 - revision: 60ff20cd12 [master]
executor >  local (1)
[-        ] process > illumination                -
executor >  local (1)
[-        ] process > illumination                -
[1d/e519e0] process > registration:ashlar         [100%] 1 of 1, failed: 1 ✘
[-        ] process > background:backsub          -
[-        ] process > dearray:coreograph          -
[-        ] process > dearray:roadie:runTask      -
[-        ] process > segmentation:roadie:runTask -
[-        ] process > segmentation:worker         -
[-        ] process > segmentation:s3seg          -
[-        ] process > quantification:mcquant      -
[-        ] process > downstream:worker           -
[-        ] process > viz:autominerva             -
Error executing process > 'registration:ashlar'

Caused by:
  Process `registration:ashlar` terminated with an error exit status (1)

Command executed:

  ashlar 'exemplar-001-cycle-06.ome.tiff' 'exemplar-001-cycle-07.ome.tiff' 'exemplar-001-cycle-08.ome.tiff'  -m 30 --ffp exemplar-001-cycle-06-ffp.tif exemplar-001-cycle-07-ffp.tif exemplar-001-cycle-08-ffp.tif --dfp exemplar-001-cycle-06-dfp.tif exemplar-001-cycle-07-dfp.tif exemplar-001-cycle-08-dfp.tif -o exemplar-001.ome.tif

Command exit status:
  1

Command output:
  (empty)

Command error:
  ln: failed to create symbolic link 'exemplar-001-cycle-06.ome.tiff': Operation not permitted

Work dir:
  /mnt/x/Jose_Imaging_Data/Exemplar_001/work/1d/e519e0ec358fcc894ff1e3140b6b59

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`

Log: nextflow - Copy.log

ArtemSokolov commented 1 year ago

Hi @josenimo,

Sorry for the naive question, but are you able to write files "by hand" (i.e., outside of nextflow) to your drive x from WSL? In other words, are you able to do something like:

cd /mnt/x/Jose_Imaging_Data/Exemplar_001/work
mkdir test
cd test
touch hello_world.txt
ln -s hello_world.txt my_symlink.txt

The fact that running the pipeline works on drive c: but not another drive makes me think that the latter was not mounted with correct permissions. Can you do

ls -l /mnt/x/Jose_Imaging_Data/Exemplar_001
whoami

in WSL to see if the file/directory ownership matches the user from whoami?

josenimo commented 1 year ago

Dear @ArtemSokolov,

Thank you for helping me with this not-so-MCMICRO related issue, I appreciate it.

I ran the code you posted, and there seems to be a problem.

First: only josenimo (my WSL/linux username) is seen as the user/group of the C: drive, all other drives it just says root. image

Second: Creating a file shows that the file has root permissions, not josenimo persmissions. The user is josenimo, not root. image

I read through https://learn.microsoft.com/en-us/windows/wsl/file-permissions, a couple of times and changed the wsl.config to enable metadata, and also did not work

[automount] 
options='metadata'

By now I have read a rabbit hole worth of permission documents for linux and wsl, and feel even more confused. Thanks again!