Bench start permission denied

I get this error when I use bench start or sudo bench start

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/ubuntu/bench-repo/bench/", line 55, in cli
  File "/usr/local/lib/python2.7/dist-packages/click/", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 988, in invoke
    Command.invoke(self, ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/ubuntu/bench-repo/bench/", line 144, in bench
  File "/home/ubuntu/bench-repo/bench/", line 189, in setup_logging
    hdlr = logging.FileHandler(log_file)
  File "/usr/lib/python2.7/logging/", line 903, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/", line 928, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/home/ubuntu/frappe-bench/logs/bench.log'

When I try sudo bench setup production it asks for a user?

Try and delete the file /home/ubuntu/frappe-bench/logs/bench.log

1 Like

Worked Like a charm…thanks