OSError: [Errno 13] Permission denied

Hello,im getting this error whenever i try to initiate bench init frappe-bench && cd frappe-bench

This is the error am getting

 bench init frappe-bench && cd frappe-bench
    INFO:bench.utils:virtualenv -q env -p /usr/bin/python
    Already using interpreter /usr/bin/python
    INFO:bench.utils:./env/bin/pip -q install --upgrade pip
    INFO:bench.utils:./env/bin/pip -q install wheel
    INFO:bench.utils:./env/bin/pip -q install six
    INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
    INFO:bench.app:getting app frappe-pos
    INFO:bench.utils:git clone http://git.xxxxxx.com:80/aisenyi/frappe-pos.git   --origin upstream
    Cloning into 'frappe-pos'...
    Username for 'http://git.xxxxxxx.com:80': aisenyi
    Password for 'http://aisenyi@git.xxxxxx.com:80':
    remote: Counting objects: 133109, done.
    remote: Compressing objects: 100% (31629/31629), done.
    remote: Total 133109 (delta 100785), reused 133102 (delta 100781)
    Receiving objects: 100% (133109/133109), 113.53 MiB | 1.78 MiB/s, done.
    Resolving deltas: 100% (100785/100785), done.
    Checking connectivity... done.
    Checking out files: 100% (2361/2361), done.
    Traceback (most recent call last):
      File "/home/joru/.local/bin/bench", line 9, in <module>
        load_entry_point('bench', 'console_scripts', 'bench')()
      File "/home/joru/bench-repo/bench/cli.py", line 40, in cli
      File "/home/joru/.local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/home/joru/.local/lib/python2.7/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/home/joru/.local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/home/joru/.local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/joru/.local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/home/joru/bench-repo/bench/commands/make.py", line 28, in init
        python               = python)
      File "/home/joru/bench-repo/bench/utils.py", line 74, in init
        get_app(frappe_path, branch=frappe_branch, bench_path=path, build_asset_files=False, verbose=verbose)
      File "/home/joru/bench-repo/bench/app.py", line 103, in get_app
        os.rename(os.path.join(apps_path, repo_name), os.path.join(apps_path, app_name))
    OSError: [Errno 13] Permission denied

Any Suggestions?

Hi @givencodes
Try following:

change directory to



$ sudo chown -R frappe:frappe *

note: if you dont have a sudo user, log in as root and run the above without “sudo”…

and then try again…

The command bench init frappe-bench creates a new bench folder, so i cant really try again, other than delete the old folder and try again right?

Yes, delete the old one, go to bench-repo/ and rund

chown -R frappe:frappe *

Hope this works