Ostico / docker_matecat

Docker configuration for MateCat web cattool https://github.com/matecat/MateCat
20 stars 22 forks source link

Permision denied to the mapped folder #4

Closed dburner closed 6 years ago

dburner commented 6 years ago

Hello, when I use these images all http requests come empty but the php header is pressent. Reading from /var/log/apache2/matecat/error.log in the matecat container I can see this error message:

PHP Stack trace:
PHP   1. Bootstrap::fatalErrorHandler() /var/www/matecat/inc/Bootstrap.php:0
PHP   2. Log::doLog() /var/www/matecat/inc/Bootstrap.php:200
PHP   3. Log::_writeTo() /var/www/matecat/lib/Utils/Log.php:122
PHP   4. file_put_contents() /var/www/matecat/lib/Utils/Log.php:57
PHP Warning:  file_put_contents(/var/www/matecat/local_storage/log_archive/fatal_errors.txt): failed to open stream: Permission denied in /var/www/matecat/lib/Utils/Log.php on line 57

Do you have any ideea on how can I resolve this problem?

Thanks

Ostico commented 6 years ago

The Readme is not up to date, please can you explain better what you done? This repository is not meant to be used in production as is, but only to try the software and for development.

dburner commented 6 years ago

aparently a few reboots fixed the problem the server does respond with the interface but the uploads dont work:

[Wed Feb 28 08:48:52.717408 2018] [:error] [pid 320] [client 172.25.166.49:58611] PHP Warning:  file_get_contents(/var/www/matecat/local_storage/upload/{BDFD5CD6-82DC-7C8B-6606-F1B8B55CAD4F}/MVCInternattional.resx): failed to open stream: No such file or directory in /var/www/matecat/lib/Utils/fileupload/upload.class.php on line 432, referer: http://172.25.166.53/

[Wed Feb 28 08:48:52.717368 2018] [:error] [pid 320] [client 172.25.166.49:58611] PHP Warning:  file_put_contents(/var/www/matecat/local_storage/log_archive/upload.log): failed to open stream: Permission denied in /var/www/matecat/lib/Utils/Log.php on line 57, referer: http://172.25.166.53/
Ostico commented 6 years ago

I assume you configured MateCat correctly.

Seems the server has some kind of permission issues, i suggest you to enter inside the docker container and run killall php a chown -R /var/www/matecat, after that go in the daemons directory and run the bash script /var/www/matecat/daemons/restartAnalysis.sh

dburner commented 6 years ago

That did solve the problem, thanks but now I get an Ops an error has occurred when I press analyze to analyze a resx, the error.log of apache does not show any errors tho.

Ostico commented 6 years ago

Check the log /var/www/matecat/local_storage/fatal_errors.log to get more info.

Anyway, the master branch are fresh updated now, it should work from scratch if you recreate the images and the containers.

Ostico commented 6 years ago

Delete the files config.ini and task_manager_config.ini inside MateCat and re-create all the images.

dburner commented 6 years ago

Thanks, it worked. I still had to run chown -R ${USER_OWNER} /var/www/matecat in the matecat container for it to work, but it may be only a problem in my VM.

Edit: Apparently the chown command on a new fresh VM, it might be a good ideea I guess to put that command in the run.sh maybe or place it in the readme.

Anyway thanks for the help.