solgenomics / breedbase_dockerfile

The Dockerfiles for breeDBase
MIT License
8 stars 8 forks source link

Incorrect file permissions on the /home/production/archive/breedbase directory #7

Closed nickpalladino closed 4 years ago

nickpalladino commented 4 years ago

When sending a PUT request to the brapi /studies/id/observations endpoint, there following error is generated:

Caught exception in SGN::Controller::AJAX::BrAPI->studies_observations_granular "Can't open file /home/production/archive/breedbase/645/brapi_observations_upload/2019-09-18_20:40:09_observations.csv at lib/CXGN/UploadFile.pm line 140, <$fh> line 13."

This is due to incorrect file permissions on the /home/production/archive/breedbase directory in the docker image.

nahuel-soldevilla commented 4 years ago

I've been having a permission issue recently, kind of similar to this one:

[error] Caught exception in SGN::View::Mason->process "mkdir /tmp/root/SGN-site/mason: Permission denied at /home/production/cxgn/local-lib/lib/perl5/HTML/Mason/Compiler/ToObject.pm line 112.
 at /home/production/cxgn/local-lib/lib/perl5/Catalyst/View/HTML/Mason.pm line 173.

Happens immediately after I try to reach localhost:7080 And another one with the folder /export when I tried to upload a trial spatial layout. As a workaround I've been running:

chown -R www-data /tmp/root/SGN-site
mkdir /export
chown www-data /export

But I need to do it every time I start the container in the case of SGN-site folder.

Perhaps I should create a separate issue. Do you have an idea what could be causing this?

cc @nickpalladino @nickmorales @lukasmueller @MFlores2021 @mcrimi

-- My setup:

nickpalladino commented 4 years ago

@nahuel-soldevilla I haven't run into any permission issues when just hitting the website. Does it still do that when you don't mount the sgn folder? The export directory probably just needs the appropriate permissions set in the dockerfile.

nahuel-soldevilla commented 4 years ago

@nickpalladino

Does it still do that when you don't mount the sgn folder?

Yes