Error during bench update

I am trying to update the system from 6.27.5. I am getting the following error :
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==2.0.0’, ‘console_scripts’, ‘bench’)()
File “/home/erpnext/bench-repo/bench/”, line 40, in cli
File “/usr/local/lib/python2.7/dist-packages/click/”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/erpnext/bench-repo/bench/commands/”, line 26, in update
File “/home/erpnext/bench-repo/bench/config/”, line 122, in deprecate_old_config
put_config(common_site_config, bench_path)
File “/home/erpnext/bench-repo/bench/config/”, line 38, in put_config
with open(config_path, ‘w’) as f:
IOError: [Errno 13] Permission denied: ‘./sites/common_site_config.json’

After little digging in code it seems that it is not getting the correct path for the file. Can somebody please guide me how to correct this issue?



Hi, how are you trying to update ERPNext?

in frappe-bench directory using “bench update”


Can you try running chmod 755 on the frappe-bench folder and then run bench update again?

Tried but doesnot help.
If I try to change to code in bench-repo/bench/config/common_site_config to the absolute path instead of bench = “.”, it works but I don’t want to change the code. Moreover now it is complaining “permission denied: ./config.json”. Is there any environment variable/setting that is messed up?