innoq / iqvoc

iQvoc - A SKOS(-XL) Vocabulary Management System for the Semantic Web
http://iqvoc.net/
Other
117 stars 44 forks source link

Export issue from docker #398

Closed ncarboni closed 4 years ago

ncarboni commented 4 years ago

Hi, I am running the docker version of iqvoc but I have some problem exporting the vocabulary. After I log in the docker machine (docker exec -it <container name> /bin/bash) I run the command

rake iqvoc:export TYPE=ttl NAMESPACE='https://example.com/vocab/architecture'

but I get the following error:

I, [2019-10-09T09:49:55.037529 #828] INFO -- : Starting export... I, [2019-10-09T09:49:55.039561 #828] INFO -- : file_path = /iqvoc/public/export/iqvoc_dump-2019-10-09_09-49.ttl I, [2019-10-09T09:49:55.041995 #828] INFO -- : type = ttl I, [2019-10-09T09:49:55.045860 #828] INFO -- : Exporting namespaces... I, [2019-10-09T09:49:55.052078 #828] INFO -- : Finished exporting namespaces. I, [2019-10-09T09:49:55.054421 #828] INFO -- : Exporting collections... I, [2019-10-09T09:49:55.315739 #828] INFO -- : Finished exporting collections (0 collections exported). I, [2019-10-09T09:49:55.317584 #828] INFO -- : Exporting concepts... I, [2019-10-09T09:49:55.818413 #828] INFO -- : Concepts 1-10 exported. I, [2019-10-09T09:49:55.830111 #828] INFO -- : Finished exporting concepts (10 concepts exported). I, [2019-10-09T09:49:55.833491 #828] INFO -- : Saving export to '/iqvoc/public/export/iqvoc_dump-2019-10-09_09-49.ttl' rake aborted! Errno::EACCES: Permission denied @ rb_sysopen - /iqvoc/public/export/iqvoc_dump-2019-10-09_09-49.ttl /iqvoc/app/aides/skos_exporter.rb:124:in initialize' /iqvoc/app/aides/skos_exporter.rb:124:inopen' /iqvoc/app/aides/skos_exporter.rb:124:in save_file' /iqvoc/app/aides/skos_exporter.rb:50:inexport' /iqvoc/app/aides/skos_exporter.rb:29:in run' /iqvoc/lib/tasks/exporter.rake:16:inblock (2 levels) in <top (required)>' /iqvoc/gems/gems/rake-12.3.1/exe/rake:27:in `<top (required)>' Tasks: TOP => iqvoc:export (See full trace by running task with --trace)

Same command but with --trace

Invoke iqvoc:export (first_time) Invoke environment (first_time) Execute environment Execute iqvoc:export I, [2019-10-09T09:50:34.667662 #847] INFO -- : Starting export... I, [2019-10-09T09:50:34.672726 #847] INFO -- : file_path = /iqvoc/public/export/iqvoc_dump-2019-10-09_09-50.ttl I, [2019-10-09T09:50:34.674754 #847] INFO -- : type = ttl I, [2019-10-09T09:50:34.676802 #847] INFO -- : Exporting namespaces... I, [2019-10-09T09:50:34.682432 #847] INFO -- : Finished exporting namespaces. I, [2019-10-09T09:50:34.685034 #847] INFO -- : Exporting collections... I, [2019-10-09T09:50:34.934119 #847] INFO -- : Finished exporting collections (0 collections exported). I, [2019-10-09T09:50:34.936446 #847] INFO -- : Exporting concepts... I, [2019-10-09T09:50:35.511418 #847] INFO -- : Concepts 1-10 exported. I, [2019-10-09T09:50:35.521186 #847] INFO -- : Finished exporting concepts (10 concepts exported). I, [2019-10-09T09:50:35.524741 #847] INFO -- : Saving export to '/iqvoc/public/export/iqvoc_dump-2019-10-09_09-50.ttl' rake aborted! Errno::EACCES: Permission denied @ rb_sysopen - /iqvoc/public/export/iqvoc_dump-2019-10-09_09-50.ttl /iqvoc/app/aides/skos_exporter.rb:124:in initialize' /iqvoc/app/aides/skos_exporter.rb:124:inopen' /iqvoc/app/aides/skos_exporter.rb:124:in save_file' /iqvoc/app/aides/skos_exporter.rb:50:inexport' /iqvoc/app/aides/skos_exporter.rb:29:in run' /iqvoc/lib/tasks/exporter.rake:16:inblock (2 levels) in <top (required)>' /iqvoc/gems/gems/rake-12.3.1/lib/rake/task.rb:271:in block in execute' /iqvoc/gems/gems/rake-12.3.1/lib/rake/task.rb:271:ineach' /iqvoc/gems/gems/rake-12.3.1/lib/rake/task.rb:271:in execute' /iqvoc/gems/gems/rake-12.3.1/lib/rake/task.rb:213:inblock in invoke_with_call_chain' /usr/local/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize' /iqvoc/gems/gems/rake-12.3.1/lib/rake/task.rb:193:ininvoke_with_call_chain' /iqvoc/gems/gems/rake-12.3.1/lib/rake/task.rb:182:in invoke' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:160:ininvoke_task' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:116:in block (2 levels) in top_level' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:116:ineach' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:116:in block in top_level' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:125:inrun_with_threads' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:110:in top_level' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:83:inblock in run' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:186:in standard_exception_handling' /iqvoc/gems/gems/rake-12.3.1/lib/rake/application.rb:80:inrun' /iqvoc/gems/gems/rake-12.3.1/exe/rake:27:in <top (required)>' /usr/local/bundle/bin/rake:29:inload' /usr/local/bundle/bin/rake:29:in `

' Tasks: TOP => iqvoc:export

Afterwards, nothing is created in /iqvoc/public/export Any idea of how to resolve it?

philippneugebauer commented 4 years ago

Your file permissions do not allow to save the file: Errno::EACCES: Permission denied @ rb_sysopen - /iqvoc/public/export/iqvoc_dump-2019-10-09_09-50.ttl

ncarboni commented 4 years ago

indeed, I did not enter the container as root. It has to be entered as : docker exec -u 0 -it mycontainer /bin/bash Then everything is fine