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/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 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_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/setup.py”, line 135, in setup_procfile
setup_procfile(‘.’)
File “/home/frappe/.bench/bench/config/procfile.py”, line 19, in setup_procfile
with open(procfile_path, ‘w’) as f:
IOError: [Errno 13] Permission denied: ‘./Procfile’

Thanks

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

@hifyaan
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/init.py”, line 3095, in
@_call_aside
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 3079, in _call_aside
f(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 570, in _build_master
ws.require(requires)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 888, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, 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?
Thanks,

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 erpnext.com, account users may not have access to the server other than from a web browser client?

hope this helps

@clarkej
Issue Resolved!
Thanks,