When i do bench start /restart/update
these error appear
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/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 1063, in invoke
Command.invoke(self, 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 “/home/frappe/.bench/bench/commands/init .py”, line 21, in bench_command
setup_logging(bench_path=bench_path)
File “/home/frappe/.bench/bench/utils.py”, line 267, in setup_logging
hdlr = logging.FileHandler(log_file)
File “/usr/lib/python2.7/logging/init .py”, line 913, in init
StreamHandler.init (self, self._open())
File “/usr/lib/python2.7/logging/init .py”, line 943, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: ‘/home/frappe/frappe-bench/logs/bench.log’
how can i solve it plz
I tried the solution menstioned in it, but the same
Please more context details would help…environment, when it began, new install and so on…
I install a production copy on my server and when the installation has finished i try bench restart
sudo may be the cause of your user permission problem
This may help you compare permissions -
frappe@erpnext:~/frappe-bench$ ls -al
total 44
drwxrwxr-x 8 frappe frappe 4096 Apr 24 07:14 .
drwxr-xr-x 8 frappe frappe 4096 Apr 24 07:44 …
drwxrwxr-x 5 frappe frappe 4096 Jan 22 14:16 apps
drwxrwxr-x 3 frappe frappe 4096 Jan 22 14:18 config
drwxrwxr-x 9 frappe frappe 4096 Jan 22 14:12 env
drwxrwxr-x 2 frappe frappe 4096 Apr 22 21:43 logs
drwxrwxr-x 7 frappe frappe 4096 Jan 22 14:12 node_modules
-rw-rw-r-- 1 frappe frappe 682 Apr 24 07:14 npm-debug.log
-rw-rw-r-- 1 frappe frappe 128 Apr 13 12:53 patches.txt
-rw-rw-r-- 1 frappe frappe 405 Jan 22 14:13 Procfile
drwxrwxr-x 4 frappe frappe 4096 Jan 22 14:17 sites
1 Like
this is the output
admintah@TAH-ERP-APP:/home/frappe/frappe-bench$ ls -al
total 40
drwxr-xr-x 8 frappe frappe 4096 Apr 24 08:42 .
drwxr-xr-x 7 frappe frappe 4096 Apr 24 08:43 …
-rwxr-xr-x 1 frappe frappe 403 Apr 24 08:42 Procfile
drwxr-xr-x 4 frappe frappe 4096 Apr 24 08:43 apps
drwxr-xr-x 3 frappe frappe 4096 Apr 24 08:55 config
drwxr-xr-x 9 frappe frappe 4096 Apr 24 08:41 env
drwxr-xr-x 2 frappe frappe 4096 Apr 24 12:00 logs
drwxr-xr-x 98 frappe frappe 4096 Apr 24 08:42 node_modules
-rwxr-xr-x 1 frappe frappe 128 Apr 24 08:42 patches.txt
but when i type sudo bench restart it work fine!
MaysaaSafadi:
admintah
I suspect you are not logged as ‘frappe’ or you did not install as user ‘frappe’
PermissionError: [Errno 13] Permission denied: ‘/home/frappe/frappe-bench/logs/bench.log’
when i use bench start then geeting this error .can anyone help mi on the same .
Thanks
youssef
September 17, 2021, 12:06pm
10
Try this:
chown -R frappe:frappe /home/frappe
1 Like
where can i run this command in frappe-bench or somthing elese
youssef
September 17, 2021, 12:08pm
12
Yes, you can run it in frappe-bench
1 Like
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.6’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.12’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.8’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.1’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.13’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.7’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.19’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/bench.log’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs/scheduler.log.14’: Permission denied
chown: changing ownership of ‘/home/frappe/frappe-bench/logs’: Operation not permitted
chown: changing ownership of ‘/home/frappe/frappe-bench/.bench.cmd’: Operation not permitted
chown: changing ownership of ‘/home/frappe/frappe-bench’: Operation not permitted
chown: changing ownership of ‘/home/frappe/.profile’: Operation not permitted
chown: cannot read directory ‘/home/frappe/.config’: Permission denied
chown: changing ownership of ‘/home/frappe’: Operation not permitted
getting this error
issue resolve its work for me
Thanks
This solved my issue thanks
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 80, in cli
logger = setup_logging()
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init .py”, line 185, in setup_logging
hdlr = logging.FileHandler(log_file)
File “/usr/lib/python3.10/logging/init .py”, line 1169, in init
StreamHandler.init (self, self._open())
File “/usr/lib/python3.10/logging/init .py”, line 1201, in _open
return open_func(self.baseFilename, self.mode,
PermissionError: [Errno 13] Permission denied: ‘/home/erp/frappe-bench/logs/bench.log’
I got this error when I am trying “bench start”
How to solve it
Hussain_Naqvi:
bench start
Try
Sudo bench start
Or change the permissions of this file ‘/home/erp/frappe-bench/logs/bench.log’
Thanks, it worked for me.