I have tried to run the above commands as erpnext user but problem still remain the same.
erpnext@erpnext-vm:~/frappe-bench/apps/frappe$ git reset --hard
HEAD is now at 383a1e9 Merge pull request #882 from pdvyas/fix-mariadb
erpnext@erpnext-vm:~/frappe-bench/apps/frappe$ cd -
/home/erpnext/frappe-bench
erpnext@erpnext-vm:~/frappe-bench$ bench update
From GitHub - frappe/shopping_cart: Online Shopping Cart integrated with ERPNext
branch HEAD → FETCH_HEAD
Updating 383a1e9…226fc9c
error: unable to unlink old ‘frappe/website/doctype/web_form/web_form.json’ (Permission denied)
error: unable to unlink old ‘frappe/website/doctype/web_form/web_form.py’ (Permission denied)
Error: None
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/cli.py”, line 29, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 124, in update
pull_all_apps()
File “/home/frappe/bench-repo/bench/app.py”, line 64, in pull_all_apps
exec_cmd(“git pull {rebase} upstream HEAD”.format(rebase=rebase), cwd=app_dir)
File “/home/frappe/bench-repo/bench/utils.py”, line 59, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘git pull upstream HEAD’ returned non-zero exit status 1
Most probably i run update as root that was my mistake.
I followed your instructions but the issue still remain. Any advice?
root@erpnext-vm:/home/erpnext/frappe-bench/apps# chown -R erpnext frappe
erpnext@erpnext-vm:~/frappe-bench/apps/frappe$ git reset --hard
HEAD is now at 383a1e9 Merge pull request #882 from pdvyas/fix-mariadb
su # enter root password, default is erpnext
cd /home/erpnext/frappe-bench/apps
chown -R erpnext * # become erpnext again
exit
cd /home/erpnext/frappe-bench/apps
for repo in *; do cd $repo && pwd && git reset --hard && cd -; done