Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied IO Error #91

Open
MichaelHarmsTIB opened this issue Aug 29, 2019 · 7 comments
Open

Permission denied IO Error #91

MichaelHarmsTIB opened this issue Aug 29, 2019 · 7 comments

Comments

@MichaelHarmsTIB
Copy link

Hello,
I installed pages plugin, but if i activate the plugin in the ini file i got this error:
IOError: [Errno 13] Permission denied: u'/usr/lib/ckan/default/src/ckan/ckan/public/base/i18n/de.js'
Owner of the file is user ckan and group is www-data but it doesnt work. So what I did wrong?

@amercader
Copy link
Member

@MichaelHarmsTIB can you give more details about how you installed the plugin?

@MichaelHarmsTIB
Copy link
Author

I install in my virt enviroment with pip this:
pip install -e 'git+https://github.com/ckan/ckanext-pages.git#egg=ckan-pages
then I changed the folder to pages and:
python setup.py develop
installed it. After that, I wrote pages to my plugins in the ini-file.

@MichaelHarmsTIB
Copy link
Author

MichaelHarmsTIB commented Aug 29, 2019

[Thu Aug 29 11:28:15.390619 2019] [wsgi:error] [pid 20571:tid 139882594166528] 2019-08-29 11:28:15,390 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
[Thu Aug 29 11:28:15.516981 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] mod_wsgi (pid=20571): Failed to exec Python script file '/etc/ckan/default/apache.wsgi'.
[Thu Aug 29 11:28:15.516997 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] mod_wsgi (pid=20571): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
[Thu Aug 29 11:28:15.517017 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] Traceback (most recent call last):
[Thu Aug 29 11:28:15.517057 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/etc/ckan/default/apache.wsgi", line 10, in <module>
[Thu Aug 29 11:28:15.517078 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     application = loadapp('config:%s' % config_filepath)
[Thu Aug 29 11:28:15.517085 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Thu Aug 29 11:28:15.517095 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return loadobj(APP, uri, name=name, **kw)
[Thu Aug 29 11:28:15.517100 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Thu Aug 29 11:28:15.517107 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return context.create()
[Thu Aug 29 11:28:15.517111 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Thu Aug 29 11:28:15.517118 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return self.object_type.invoke(self)
[Thu Aug 29 11:28:15.517122 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Thu Aug 29 11:28:15.517128 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return fix_call(context.object, context.global_conf, **context.local_conf)
[Thu Aug 29 11:28:15.517133 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
[Thu Aug 29 11:28:15.517140 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     val = callable(*args, **kw)
[Thu Aug 29 11:28:15.517145 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 55, in make_app
[Thu Aug 29 11:28:15.517153 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     load_environment(conf, app_conf)
[Thu Aug 29 11:28:15.517158 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 127, in load_environment
[Thu Aug 29 11:28:15.517165 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     build_js_translations()
[Thu Aug 29 11:28:15.517170 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/lib/i18n.py", line 408, in build_js_translations
[Thu Aug 29 11:28:15.517251 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     _build_js_translation(lang, po_files, js_entries, dest_file)
[Thu Aug 29 11:28:15.517260 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/lib/i18n.py", line 348, in _build_js_translation
[Thu Aug 29 11:28:15.517269 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     with open(dest_filename, u'w') as f:
[Thu Aug 29 11:28:15.390619 2019] [wsgi:error] [pid 20571:tid 139882594166528] 2019-08-29 11:28:15,390 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
[Thu Aug 29 11:28:15.516981 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] mod_wsgi (pid=20571): Failed to exec Python script file '/etc/ckan/default/apache.wsgi'.
[Thu Aug 29 11:28:15.516997 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] mod_wsgi (pid=20571): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
[Thu Aug 29 11:28:15.517017 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] Traceback (most recent call last):
[Thu Aug 29 11:28:15.517057 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/etc/ckan/default/apache.wsgi", line 10, in <module>
[Thu Aug 29 11:28:15.517078 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     application = loadapp('config:%s' % config_filepath)
[Thu Aug 29 11:28:15.517085 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Thu Aug 29 11:28:15.517095 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return loadobj(APP, uri, name=name, **kw)
[Thu Aug 29 11:28:15.517100 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Thu Aug 29 11:28:15.517107 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return context.create()
[Thu Aug 29 11:28:15.517111 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Thu Aug 29 11:28:15.517118 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return self.object_type.invoke(self)
[Thu Aug 29 11:28:15.517122 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Thu Aug 29 11:28:15.517128 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return fix_call(context.object, context.global_conf, **context.local_conf)
[Thu Aug 29 11:28:15.517133 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
[Thu Aug 29 11:28:15.517140 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     val = callable(*args, **kw)
[Thu Aug 29 11:28:15.517145 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 55, in make_app
[Thu Aug 29 11:28:15.517153 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     load_environment(conf, app_conf)
[Thu Aug 29 11:28:15.517158 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 127, in load_environment
[Thu Aug 29 11:28:15.517165 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     build_js_translations()
[Thu Aug 29 11:28:15.517170 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/lib/i18n.py", line 408, in build_js_translations
[Thu Aug 29 11:28:15.517251 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     _build_js_translation(lang, po_files, js_entries, dest_file)
[Thu Aug 29 11:28:15.517260 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/lib/i18n.py", line 348, in _build_js_translation
[Thu Aug 29 11:28:15.517269 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     with open(dest_filename, u'w') as f:
[Thu Aug 29 11:28:15.390619 2019] [wsgi:error] [pid 20571:tid 139882594166528] 2019-08-29 11:28:15,390 INFO  [ckan.config.environment] Loading templates from /usr/lib/ckan/default/src/ckan/ckan/templates
[Thu Aug 29 11:28:15.516981 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] mod_wsgi (pid=20571): Failed to exec Python script file '/etc/ckan/default/apache.wsgi'.
[Thu Aug 29 11:28:15.516997 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] mod_wsgi (pid=20571): Exception occurred processing WSGI script '/etc/ckan/default/apache.wsgi'.
[Thu Aug 29 11:28:15.517017 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] Traceback (most recent call last):
[Thu Aug 29 11:28:15.517057 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/etc/ckan/default/apache.wsgi", line 10, in <module>
[Thu Aug 29 11:28:15.517078 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     application = loadapp('config:%s' % config_filepath)
[Thu Aug 29 11:28:15.517085 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
[Thu Aug 29 11:28:15.517095 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return loadobj(APP, uri, name=name, **kw)
[Thu Aug 29 11:28:15.517100 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
[Thu Aug 29 11:28:15.517107 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return context.create()
[Thu Aug 29 11:28:15.517111 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 710, in create
[Thu Aug 29 11:28:15.517118 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return self.object_type.invoke(self)
[Thu Aug 29 11:28:15.517122 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 146, in invoke
[Thu Aug 29 11:28:15.517128 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     return fix_call(context.object, context.global_conf, **context.local_conf)
[Thu Aug 29 11:28:15.517133 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/lib/python2.7/site-packages/paste/deploy/util.py", line 55, in fix_call
[Thu Aug 29 11:28:15.517140 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     val = callable(*args, **kw)
[Thu Aug 29 11:28:15.517145 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/config/middleware/__init__.py", line 55, in make_app
[Thu Aug 29 11:28:15.517153 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     load_environment(conf, app_conf)
[Thu Aug 29 11:28:15.517158 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/config/environment.py", line 127, in load_environment
[Thu Aug 29 11:28:15.517165 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     build_js_translations()
[Thu Aug 29 11:28:15.517170 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/lib/i18n.py", line 408, in build_js_translations
[Thu Aug 29 11:28:15.517251 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     _build_js_translation(lang, po_files, js_entries, dest_file)
[Thu Aug 29 11:28:15.517260 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]   File "/usr/lib/ckan/default/src/ckan/ckan/lib/i18n.py", line 348, in _build_js_translation
[Thu Aug 29 11:28:15.517269 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424]     with open(dest_filename, u'w') as f:
[Thu Aug 29 11:28:15.517282 2019] [wsgi:error] [pid 20571:tid 139882594166528] [remote 127.0.0.1:50424] IOError: [Errno 13] Permission denied: u'/usr/lib/ckan/default/src/ckan/ckan/public/base/i18n/de.js'

@amercader
Copy link
Member

@MichaelHarmsTIB some things to try:

  • use egg=ckanext-pages on your install command
  • Check the latest code, I pushed a fix for the i18n which should not be related to your issue but better be safe
  • Check that the /usr/lib/ckan/default/src/ckan/ckan/public/base/i18n/ exists and is writeable by the user you are running ckan with

@MichaelHarmsTIB
Copy link
Author

Ok Thx a lot. I changed the user from ckan to www-data and it run.
Last Question, I cant find a cms, how I add new pages to ckan?

@turbomanson
Copy link

turbomanson commented Nov 19, 2019

@MichaelHarmsTIB I had the same error, how did you change the user?

I ran sudo chown www-data /usr/lib/ckan/default/src/ckan/ckan/public/base/i18n/

Appreciate any advice you have.

@turbomanson
Copy link

After playing around with permissions these are the permissions that worked:
sudo chown -R www-data '/usr/lib/ckan/default/src/ckan/ckan/public/base/i18n/'
sudo chmod -R u+rwx '/usr/lib/ckan/default/src/ckan/ckan/public/base/i18n/'

Hope this helps others that run into this issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants