PermissionError: [Errno 13] Permission denied: 'Pipfile' IBM Hyperledger Indy

1.2k Views Asked by At

I am running into a problem when running startup scripts for this project: https://github.com/IBM-Blockchain-Identity/indy-ssivc-tutorial There is already an issue out on this on the GitHub page (See: https://github.com/IBM-Blockchain-Identity/indy-ssivc-tutorial/issues/7), but it has not been answered yet. I figured it has to be some sort of permissions issue, but i have already created a Pipfile for the project using pipenv lock and giving it permissions.

I was thinking this might not be a issue with the actual project and maybe just a general error on my end someone here could help with.

Here is the error I am getting when trying to start "sudo ./manage start"

> von-web_1  | Traceback (most recent call last): von-web_1  |   File
    > "/usr/local/bin/pipenv", line 11, in <module> von-web_1  |    
    > sys.exit(cli()) von-web_1  |   File
    > "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py",
    > line 722, in __call__ von-web_1  |     return self.main(*args,
    > **kwargs) von-web_1  |   File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py",
    > line 697, in main von-web_1  |     rv = self.invoke(ctx) von-web_1  | 
    > File
    > "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py",
    > line 1066, in invoke von-web_1  |     return
    > _process_result(sub_ctx.command.invoke(sub_ctx)) von-web_1  |   File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py",
    > line 895, in invoke von-web_1  |     return ctx.invoke(self.callback,
    > **ctx.params) von-web_1  |   File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/click/core.py",
    > line 535, in invoke von-web_1  |     return callback(*args, **kwargs)
    > von-web_1  |   File
    > "/usr/local/lib/python3.5/dist-packages/pipenv/cli.py", line 701, in
    > run von-web_1  |     do_run(command=command, args=args, three=three,
    > python=python, pypi_mirror=pypi_mirror) von-web_1  |   File
    > "/usr/local/lib/python3.5/dist-packages/pipenv/core.py", line 2244, in
    > do_run von-web_1  |     ensure_project(three=three, python=python,
    > validate=False, pypi_mirror=pypi_mirror) von-web_1  |   File
    > "/usr/local/lib/python3.5/dist-packages/pipenv/core.py", line 605, in
    > ensure_project von-web_1  |     project.touch_pipfile() von-web_1  |  
    > File "/usr/local/lib/python3.5/dist-packages/pipenv/project.py", line
    > 559, in touch_pipfile von-web_1  |     with open('Pipfile', 'a'):
    > von-web_1  | PermissionError: [Errno 13] Permission denied: 'Pipfile'
    > von_von-web_1 exited with code 1
2

There are 2 best solutions below

0
On

I have installed the Hyperledger Indy SS VC Demo on MacOs with Python 3.6.3. Perhaps it is 3.6.3 version, I have not faced the above mentioned issues. We can see the following patch in the Github issue list. If you are facing the issue after upgrading the Python version, please let me know.

The Pipfile and Pipfile.lock files had Python version 3.5 already set at the tops of the files. As a patch, I fixed the permission issue with by adding the following line near the top of von-network/scripts/start_webserver.sh:

find /* -type d | xargs chmod 777 --silent

The command just has to go after the bin/bash header at the top, which would be line 2. Make sure that you use "/*" after "find". It should only fix the Pipfile error.

0
On

You can see the status of what's broken in your coding system:

$ brew doctor

You can clean up through the following command:

$ brew cleanup

But I recommend you uninstall Python and install it again:

$ brew uninstall --ignore-dependencies python3
$ brew install python3