Getting permission error when running bench start

Hello
whenever I am trying to start the bench I am facing this error
I am not sure which files needs which permission
I tried chmod chown on the whole env folder but that doesnt work

19:38:42 system           | redis_cache.1 started (pid=6254)
19:38:42 system           | redis_queue.1 started (pid=6261)
19:38:42 system           | redis_socketio.1 started (pid=6258)
19:38:42 redis_cache.1    | 6263:C 07 Jul 2022 19:38:42.744 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
19:38:42 redis_cache.1    | 6263:C 07 Jul 2022 19:38:42.744 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=6263, just started
19:38:42 redis_cache.1    | 6263:C 07 Jul 2022 19:38:42.744 # Configuration loaded
19:38:42 redis_cache.1    | 6263:M 07 Jul 2022 19:38:42.745 * Increased maximum number of open files to 10032 (it was originally set to 1024).
19:38:42 redis_cache.1    | 6263:M 07 Jul 2022 19:38:42.745 * Running mode=standalone, port=13001.
19:38:42 redis_cache.1    | 6263:M 07 Jul 2022 19:38:42.745 # Server initialized
19:38:42 redis_cache.1    | 6263:M 07 Jul 2022 19:38:42.745 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
19:38:42 redis_cache.1    | 6263:M 07 Jul 2022 19:38:42.745 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
19:38:42 redis_cache.1    | 6263:M 07 Jul 2022 19:38:42.746 * Ready to accept connections
19:38:42 redis_queue.1    | 6271:C 07 Jul 2022 19:38:42.748 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
19:38:42 system           | worker_short.1 started (pid=6266)
19:38:42 system           | schedule.1 started (pid=6267)
19:38:42 system           | socketio.1 started (pid=6265)
19:38:42 system           | web.1 started (pid=6262)
19:38:42 redis_socketio.1 | 6277:C 07 Jul 2022 19:38:42.758 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
19:38:42 system           | watch.1 started (pid=6268)
19:38:42 redis_queue.1    | 6271:C 07 Jul 2022 19:38:42.760 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=6271, just started
19:38:42 redis_queue.1    | 6271:C 07 Jul 2022 19:38:42.768 # Configuration loaded
19:38:42 redis_socketio.1 | 6277:C 07 Jul 2022 19:38:42.768 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=6277, just started
19:38:42 redis_socketio.1 | 6277:C 07 Jul 2022 19:38:42.768 # Configuration loaded
19:38:42 redis_socketio.1 | 6277:M 07 Jul 2022 19:38:42.769 * Increased maximum number of open files to 10032 (it was originally set to 1024).
19:38:42 redis_queue.1    | 6271:M 07 Jul 2022 19:38:42.769 * Increased maximum number of open files to 10032 (it was originally set to 1024).
19:38:42 redis_socketio.1 | 6277:M 07 Jul 2022 19:38:42.769 * Running mode=standalone, port=12001.
19:38:42 redis_socketio.1 | 6277:M 07 Jul 2022 19:38:42.769 # Server initialized
19:38:42 redis_socketio.1 | 6277:M 07 Jul 2022 19:38:42.769 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
19:38:42 redis_socketio.1 | 6277:M 07 Jul 2022 19:38:42.770 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
19:38:42 redis_socketio.1 | 6277:M 07 Jul 2022 19:38:42.770 * Ready to accept connections
19:38:42 redis_queue.1    | 6271:M 07 Jul 2022 19:38:42.772 * Running mode=standalone, port=11001.
19:38:42 system           | worker_default.1 started (pid=6286)
19:38:42 redis_queue.1    | 6271:M 07 Jul 2022 19:38:42.777 # Server initialized
19:38:42 redis_queue.1    | 6271:M 07 Jul 2022 19:38:42.777 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
19:38:42 redis_queue.1    | 6271:M 07 Jul 2022 19:38:42.777 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
19:38:42 system           | worker_long.1 started (pid=6292)
19:38:42 redis_queue.1    | 6271:M 07 Jul 2022 19:38:42.778 * Ready to accept connections
19:38:43 socketio.1       | listening on *: 9001
19:38:44 web.1            | Traceback (most recent call last):
19:38:44 web.1            |   File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
19:38:44 web.1            |     return _run_code(code, main_globals, None,
19:38:44 web.1            |   File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
19:38:44 web.1            |     exec(code, run_globals)
19:38:44 web.1            |   File "/home/harsh/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 110, in <module>
19:38:44 web.1            |     main()
19:38:44 web.1            |   File "/home/harsh/erpnext/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
19:38:44 web.1            |     click.Group(commands=commands)(prog_name="bench")
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
19:38:44 web.1            |     return self.main(*args, **kwargs)
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/click/core.py", line 782, in main
19:38:44 web.1            |     rv = self.invoke(ctx)
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
19:38:44 web.1            |     return _process_result(sub_ctx.command.invoke(sub_ctx))
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
19:38:44 web.1            |     return _process_result(sub_ctx.command.invoke(sub_ctx))
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
19:38:44 web.1            |     return ctx.invoke(self.callback, **ctx.params)
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
19:38:44 web.1            |     return callback(*args, **kwargs)
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/click/decorators.py", line 21, in new_func
19:38:44 web.1            |     return f(get_current_context(), *args, **kwargs)
19:38:44 web.1            |   File "/home/harsh/erpnext/apps/frappe/frappe/commands/__init__.py", line 31, in _func
19:38:44 web.1            |     ret = f(frappe._dict(ctx.obj), *args, **kwargs)
19:38:44 web.1            |   File "/home/harsh/erpnext/apps/frappe/frappe/commands/utils.py", line 833, in serve
19:38:44 web.1            |     frappe.app.serve(
19:38:44 web.1            |   File "/home/harsh/erpnext/apps/frappe/frappe/app.py", line 353, in serve
19:38:44 web.1            |     run_simple(
19:38:44 web.1            |   File "/home/harsh/erpnext/env/lib/python3.8/site-packages/werkzeug/serving.py", line 990, in run_simple
19:38:44 web.1            |     s.bind(server_address)
19:38:44 web.1            | PermissionError: [Errno 13] Permission denied
19:38:44 system           | web.1 stopped (rc=1)

@Harsh_Magiya Sorry buddy, I’m not a Bench expert :frowning_face:

1 Like

no problem
Thanks for your time

What version of bench are you using?

In your bench directory, there should exist a file named “Procfile”. Inside is a line that looks like this:

web: bench serve --port 8000

Can you verify your line also has port 8000?

I am using v 13

my proc file has the port as 8001
every port has 1 in the end
I suppose because I had a site running when I created my new site

Sorry I it was 81 and when I changed it to 8000 it started working
Thanks for the help

1 Like

if you are on ubuntu try running with sudo bench start.

@brian_pond Hey if possible can you also check this thread
Thanks

Filters_config not implemented and permission dies error after bench start in console - ERPNext Forum