Did an update (upgrade using bench init --frappe-branch --version-13…) and then restoring the older backup. I’m getting a permission error:
ERROR: Read crontab erpnext: b’must be privileged to use -u\n’
the output looks like this:
$ bench update --patch
ERROR: Read crontab erpnext: b’must be privileged to use -u\n’
Traceback (most recent call last):
File “/home/frappe/.local/bin/bench”, line 8, in
sys.exit(cli())
File “/home/frappe/.local/lib/python3.7/site-packages/bench/cli.py”, line 121, in cli
raise e
File “/home/frappe/.local/lib/python3.7/site-packages/bench/cli.py”, line 111, in cli
bench_command()
File “/home/frappe/.local/lib/python3.7/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/frappe/.local/lib/python3.7/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/frappe/.local/lib/python3.7/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/.local/lib/python3.7/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/.local/lib/python3.7/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.local/lib/python3.7/site-packages/bench/commands/update.py”, line 23, in update
update(pull=pull, apps=apps, patch=patch, build=build, requirements=requirements, restart_supervisor=restart_supervisor, restart_systemd=restart_systemd, backup=not no_backup, compile=not no_compile, force=force, reset=reset)
File “/home/frappe/.local/lib/python3.7/site-packages/bench/utils/bench.py”, line 373, in update
patches.run(bench_path=bench_path)
File “/home/frappe/.local/lib/python3.7/site-packages/bench/patches/init.py”, line 21, in run
result = execute(bench_path)
File “/home/frappe/.local/lib/python3.7/site-packages/bench/patches/v5/fix_backup_cronjob.py”, line 11, in execute
user_crontab = CronTab(user=user)
File “/usr/local/lib/python3.7/dist-packages/crontab.py”, line 227, in init
self.read(tabfile)
File “/usr/local/lib/python3.7/dist-packages/crontab.py”, line 288, in read
raise IOError(“Read crontab %s: %s” % (self.user, err))
OSError: Read crontab erpnext: b’must be privileged to use -u\n’
frappe@erpa:/opt/erpnext/frappe$ ERROR: Read crontab erpnext: b’must be privileged to use -u\n’
-bash: ERROR:: command not found