wabarc / ipfs-pinner

A toolkit helps upload files to IPFS pinning services.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Permission denied error when using Snapcraft

RangerMauve opened this issue · comments

I'm using POP OS 20.10 (basically Ubuntu 20.10) with ipfs-pinner 0+git.9cf4d45 from snapcraft.

I've got a folder called files with a single txt file which is owned by my user on the system.

When I try to run ipfs-pinner -p pinata ./files/, I get the error open ./files/: permission denied.

Is this a snapcraft quirk with how it's sandboxing works? Any help with debugging this would be very much appreciated. 😁

Looks like it's caused by the user not having permission to read the ./files directory, please check the permissions.

Currently, ipfs-pinner pinning entire directories doesn't support yet, but it will work after #20. But you can use ipfs-pinner ./files/* to pin all the files in a directory at once instead.

Looks like it's caused by the user not having permission to read the ./files directory, please check the permissions.

I'm running the ipfs-pinner binary as my current user, and when I try to cat that file, there is no error. Does snapcraft run the binary under a different user?

Specifying the exact file doesn't help either, sadly.

ipfs-pinner ./files/example.txt 
open ./files/example.txt: permission denied

Now it should be fixed at d92ad0f, please have a try to download snap from artifact and install it as below steps:

  1. navigate to workflow runs
  2. find the ipfs-pinner-snap-amd64
  3. download and extract it using unzip or other
  4. remove previous binary using snap remove ipfs-pinner
  5. install extracted snap using snap install --dangerous ./ipfs-pinner_*_amd64.snap
  6. try again pin file

Hi, was this merged into the current snap?

@nnnnicholas Not yet. I tested d92ad0f in Docker environment and want to confirm it in the host environment before releasing it, if you don't mind, please install the snap from workflow runs to have a test.

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days