[Loris-dev] upload_file.pl issue
Ioannis Pappas
ioannis at berkeley.edu
Thu Sep 17 21:54:47 EDT 2020
Hi Nicolas.
Apologies for the late reply but I wanted to look into it more with the kind help of Julie (our sys admin). For your information the exact error is this:
Can't cd to (/tmp/ImagingUpload-15-8-Z8Hax5/) BR013_243782_V1: Permission denied
at /data/loris-mri/bin/mri/uploadNeuroDB/NeuroDB/ImagingUpload.pm line 202.
However, I can write in /tmp no problem e.g.
[lorisadmin at loris ~]$ mkdir /tmp/ImagingUpload-15-8-Z8Hax5/
[lorisadmin at loris ~]$ ls -ld /tmp/ImagingUpload-15-8-Z8Hax5/
drwxrwxr-x 2 lorisadmin lorisadmin 4096 Sep 17 15:14 /tmp/ImagingUpload-15-8-Z8Hax5/
I think that the problem is that the perl script doesn’t make the temporary directory after unzipping in /tmp and then all of sudden it wants to cd there (that’s why I get “permission denied” it just doesn’t exist).
My .zip (BR013_243782_V1.zip) contains one folder (BR013_243782_V1) of .dcm files for simplicity. Should there be some internal structure there (or something else in terms of naming)?
Thank you very much.
Best wishes,
Ioannis
> On Sep 15, 2020, at 1:44 PM, Nicolas Brossard <nicolasbrossard.mni at gmail.com> wrote:
>
> Hi Ioannis,
>
> No worries, we're here to help!
>
> On Unix systems, all users usually have permission to create directories in /tmp but just to be sure it'd be good idea to test that: just try
>
> % mkdir /tmp/hello
>
> and see if that works. If it does, then it means there's something more "sneaky" going on.
>
> You can try specifying an alternate temporary directory in which the upload script will write files: just type the following line in your environment file (located in the LORIS-MRI root directory):
>
> export TMPDIR=/my/alternate/temporary/dir
>
>
> Let me know if that helps.
>
>
> Cheers,
> Nicolas
>
>
> On Tue, Sep 15, 2020 at 4:23 PM Ioannis Pappas <ioannis at berkeley.edu <mailto:ioannis at berkeley.edu>> wrote:
> Hi Loris support.
>
> Another quick question (hopefully I don’t occupy a lot of your time during this pandemic).
>
> I am running the simple imaging upload pearl script like this:
>
> sudo -i -u lorisadmin /data/loris-mri/bin/mri/uploadNeuroDB/imaging_upload_file.pl <http://imaging_upload_file.pl/> -profile prod -upload_id 2 /data/loris/incoming/BR013_243782_V1.zip -verbose
>
> I think the script involves creating some directories because it leads to an error. The error is this:
>
> mkdir /tmp/ImagingUpload-13-7-7Z_JFF/BR013_243782_V1/BIAS_12ch_22: Permission denied at /usr/local/share/perl5/Archive/Zip/DirectoryMember.pm
>
> Do you guys think it has to do with my permission at /tmp or there is something else more sneaky? The /tmp folder doesn’t seem to have anything related to ImagingUpload[..]
>
> Thank you very much. Hopefully I don’t see more errors in the script.
>
> Best wishes,
> Ioannis
> _______________________________________________
> Loris-dev mailing list
> Loris-dev at bic.mni.mcgill.ca <mailto:Loris-dev at bic.mni.mcgill.ca>
> https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev <https://mailman.bic.mni.mcgill.ca/mailman/listinfo/loris-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20200917/873cb070/attachment.html>
More information about the Loris-dev
mailing list