Permission denied: './Procfile'

Need help.
When I run bench setup procfile
I the following error.

frappe@erp:/root$ bench setup procfile

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/”, line 40, in cli
File “/usr/local/lib/python2.7/dist-packages/click/”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/”, line 135, in setup_procfile
File “/home/frappe/.bench/bench/config/”, line 19, in setup_procfile
with open(procfile_path, ‘w’) as f:
IOError: [Errno 13] Permission denied: ‘./Procfile’


run using sudo

sudo bench setup procfile

frappe@erp:/root$ sudo bench setup procfile
You should not run this command as root

yes correct you shouldn’t run as root
check the permissions on the directory and the files its self
btw what os are you running

I’m running Ubuntu 14.04.5 LTS

try this i am not sure…

chmod -R 777 /home/user/frappe-bench/Procfile

Should I be logged in as root or?

Able to log in with user as frappe and issue the command $bench start

See the outcome and advise.

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 6, in
from pkg_resources import load_entry_point
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 3095, in
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 3079, in _call_aside
f(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 570, in _build_master
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 888, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 774, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘bench’ distribution was not found and i s required by the application

Can you please Elaborate how to log in with user as frappe ?
Did you find the solution?

Welcome to ERPNext farqalit,

To login as frappe typically refers to server side direct access to an instance.

For this ‘terminal console’ access you need to install and run your own self-hosted instance.

In the case of ERPNext hosted on for example, account users may not have access to the server other than from a web browser client?

hope this helps

Issue Resolved!