Permission denied

when i run bench update i am getting below errors,
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/opt/bench/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/opt/bench/bench-repo/bench/commands/update.py”, line 32, in update
patches.run(bench_path=’.’)
File “/opt/bench/bench-repo/bench/patches/init.py”, line 27, in run
with open(target_patch_file, ‘w’) as f:
IOError: [Errno 13] Permission denied: ‘/opt/bench/patches.txt’

try with sudo

Thanks

i tried. Not working

Somthing wrong with your file permissions. Ensure that you set correct file permissions in /opt/bench/ folder for the current user.

Try this

chown -R frappe:frappe /home/frappe

cheers