Problem in multi tenant setup

Hi ,

I came across following error while running " bench set-nginx-port site2name 82" command on Debian 7

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/”, line 37, in cli
return bench()
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/frappe/bench-repo/bench/”, line 213, in set_nginx_port
_set_nginx_port(site, port)
File “/home/frappe/bench-repo/bench/”, line 244, in set_nginx_port
File “/home/frappe/bench-repo/bench/”, line 62, in generate_nginx_config
with open(“config/nginx.conf”, ‘w’) as f:
IOError: [Errno 13] Permission denied: ‘config/nginx.conf’

I tried using root login also but not successful. Can anyone help me


Please run,
bench patch fix-perms as root and then try the command again.

Thank You for the support. It is working now