[Loris-dev] Fwd: using media module through front end

Carolina Makowski carolina.mak3 at gmail.com
Thu Jun 1 21:57:54 EDT 2017


Hi Justin,
we probably should have posted the final "solution" to this on loris-dev
but yes, exactly, we needed to have lorisadmin:www-data ownership, and
change permissions on /data/uploads with chmod -R 755. This ended up
working for me :)

thanks for looking into it,

Carolina

On Thu, Jun 1, 2017 at 6:54 PM, Justin Kat <justinkat at gmail.com> wrote:

> I've never looked at the Media module code but looks like you either need
> www-data to be part of lorisadmin or add group write permissions on
> /data/uploads
>
> On Thu, Jun 1, 2017 at 12:59 PM, Carolina Makowski <
> carolina.mak3 at gmail.com> wrote:
>
>> Hi Christine,
>>
>> Just to provide some more info on the steps I have taken:
>>
>> 1) Here are the most recent errors I am getting in my loris-error.log
>> file:
>>
>> [Thu Jun 01 09:44:46.935475 2017] [:error] [pid 1786] [client
>> 169.228.191.13:62450] PHP Warning:  move_uploaded_file(/data/uploa
>> ds/DCC0000_baselineyear1arm1_CBCL_test.txt): failed to open stream:
>> Permission denied in /var/www/abcd/modules/media/ajax/FileUpload.php on
>> line 146, referer: http://169.228.56.161/media/
>>
>> [Thu Jun 01 09:44:46.935557 2017] [:error] [pid 1786] [client
>> 169.228.191.13:62450] PHP Warning:  move_uploaded_file(): Unable to move
>> '/tmp/phpCY7laj' to '/data/uploads/DCC0000_baselineyear1arm1_CBCL_test.txt'
>> in /var/www/abcd/modules/media/ajax/FileUpload.php on line 146, referer:
>> http://169.228.56.161/media/
>>
>> It does seem like a permissions issue. Below you will see the permissions
>> on my /data/uploads/ directory and my FileUpload.php file in
>> /var/www/abcd/modules/media/ajax/
>>
>> drwxr-xr-x  2 lorisadmin www-data   4096 Mar 27 10:34 *uploads*
>>
>> -rwxr-xr-x 1 lorisadmin lorisadmin 8319 Feb  3 10:13 *FileUpload.php*
>>
>> 2) I also tried to do a "chown lorisadmin:www-data FileUpload.php" to
>> match with the ownership of /data/uploads. This also did not work and the
>> file is "uploaded 100%" as indicated by the front end but the screen
>> freezes at this point, and no file can be found in /data/uploads.
>>
>> As you can see, I switched to testing out an instrument that had no
>> underscores in the name, just to double check this wasn't an issue. Let me
>> know if you or anyone else on the team have any other suggestions to fix
>> the permissions error.
>>
>> Thanks,
>> Carolina
>>
>> ---------- Forwarded message ----------
>> From: Carolina Makowski <carolina.mak3 at gmail.com>
>> Date: Wed, May 31, 2017 at 3:42 PM
>> Subject: Re: [Loris-dev] using media module through front end
>> To: Christine Rogers <christine.rogers at mcgill.ca>
>> Cc: "loris-dev at bic.mni.mcgill.ca" <loris-dev at bic.mni.mcgill.ca>
>>
>>
>> Hi Christine,
>> Here are the last two warnings pertaining to the upload (there are no
>> "true" errors):
>>
>> [Wed May 31 15:40:23.721871 2017] [:error] [pid 30667] [client
>> 137.110.9.195:57908] PHP Warning:  move_uploaded_file(/data/uploa
>> ds/NDARINV1K3LDK3L_baselineyear1arm1_eprime_data_upload_ABCD
>> -nBack-fMRI_run-2016101014 <(201)%20610-1014>2333-EventRelatedInformation.csv):
>> failed to open stream: Permission denied in /var/www/abcd/modules/media/ajax/FileUpload.php
>> on line 146, referer: http://169.228.56.161/media/
>>
>> [Wed May 31 15:40:23.721935 2017] [:error] [pid 30667] [client
>> 137.110.9.195:57908] PHP Warning:  move_uploaded_file(): Unable to move
>> '/tmp/phpNAaV2G' to '/data/uploads/NDARINV1K3LDK3L
>> _baselineyear1arm1_eprime_data_upload_ABCD-nBack-fMRI_run-
>> 20161010142333-EventRelatedInformation.csv' in
>> /var/www/abcd/modules/media/ajax/FileUpload.php on line 146, referer:
>> http://169.228.56.161/media/
>>
>>
>> And here is a screenshot of the front end, where you see the progress bar
>> but the "Upload file" button is highlighted blue and the progress bar just
>> seems to stall.
>>
>> Carolina
>>
>> On Wed, May 31, 2017 at 3:33 PM, Christine Rogers <
>> christine.rogers at mcgill.ca> wrote:
>>
>>> Hi Carolina,
>>> Thanks, great to know.
>>> What does the Apache error log say?  That would be the next thing for
>>> the team to know.
>>> Cheers,
>>> Christine
>>>
>>>
>>>
>>> On May 31, 2017, at 6:13 PM, Carolina Makowski <carolina.mak3 at gmail.com>
>>> wrote:
>>>
>>> Hi Christine,
>>> No, there was no file uploaded onto the server and nothing on the
>>> database regarding status of the upload - after about 10 minutes I just
>>> navigated away from the page, so there doesn't seem to be a trace of the
>>> attempt.
>>>
>>> Carolina
>>>
>>> On Wed, May 31, 2017 at 3:06 PM, Christine Rogers <
>>> christine.rogers at mcgill.ca> wrote:
>>>
>>>> Hi Carolina,
>>>>
>>>> Do you see the file on the server?
>>>> Also does the database have an entry written to it recording the upload
>>>> of this file?
>>>> These two things could help with troubleshooting...
>>>> C
>>>>
>>>>
>>>>
>>>> > On May 31, 2017, at 5:15 PM, Carolina Makowski <
>>>> carolina.mak3 at gmail.com> wrote:
>>>> >
>>>> > Hi there,
>>>> > I have a question about properly setting up the Media Module in
>>>> LORIS. I am having trouble uploading a file through the front end of the
>>>> database.
>>>> > I have gone through the readme in the /modules directory, and have
>>>> ensured my path in the front end Configuration module matches where the
>>>> data is expected to come in (i.e. /data/uploads/) and I have ensured
>>>> /data/uploads has 775 permission and www-data permissions.
>>>> >
>>>> > On the front end, the file is uploading and the progress bar reaches
>>>> 100%, but at this point nothing happens and progress simply stalls there
>>>> (not sure if a "successfully uploaded" message or something of the like is
>>>> supposed to appear here). Moving to the Browse tab shows that nothing was
>>>> uploaded. It is only a 200K file and is well within the upload limits we
>>>> set for our database.
>>>> >
>>>> > I know this is a relatively new module - let me know if something
>>>> jumps out at you here. Thanks!
>>>> >
>>>> > Carolina
>>>> > _______________________________________________
>>>> > Loris-dev mailing list
>>>> > Loris-dev at bic.mni.mcgill.ca
>>>> > http://www.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>>>>
>>>
>>>
>>
>>
>> _______________________________________________
>> Loris-dev mailing list
>> Loris-dev at bic.mni.mcgill.ca
>> http://www.bic.mni.mcgill.ca/mailman/listinfo/loris-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20170601/de7368ad/attachment.html>


More information about the Loris-dev mailing list