ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

IOError: [Errno 13] Permission denied: custom_docperm.json'


#1

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, in _run_module_as_main
main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 94, in
main()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/ubuntu/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/init.py”, line 24, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/commands/utils.py”, line 200, in export_fixtures
export_fixtures()
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/utils/fixtures.py”, line 67, in export_fixtures
export_json(fixture, frappe.get_app_path(app, “fixtures”, frappe.scrub(fixture) + “.json”), filters=filters, or_filters=or_filters)
File “/home/ubuntu/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py”, line 98, in export_json
with open(path, “w”) as outfile:
IOError: [Errno 13] Permission denied: u’/home/ubuntu/frappe-bench/apps/formulation/formulation/fixtures/custom_docperm.json’

i get this error on export-fixtures
Give me a solution…


#2

Hi @arokia,

this is an access permission issue. If you have a “standard” (i.e. easy install script) installation, erpnext/frappe run under the frappe user. Make sure that all files and folders are owned by the frappe user and group

$ cd /home/frappe/frappe-bench
$ sudo chown -R frappe:frappe *

Then, repeat exporting fixtures…