Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied (os error 13): mkdir '/home/sa/.local/share/pkgx/pantry' #54

Open
FlatMapIO opened this issue Dec 5, 2023 · 3 comments

Comments

@FlatMapIO
Copy link

When I use pkgx in docker, I use the -v to share the host and the contents of the container to avoid duplicate downloads. This caused some problems when starting the pkgx container, and I think it's necessary for useSync to check if the directory exists when creating it.

docker run \
-v ~/.pkgx:/home/sa/.pkgx \
-v ~/.local:/home/sa/.local \
...
× unexpected error Permission denied (os error 13): mkdir '/home/sa/.local/share/pkgx/pantry'
│ PermissionDenied: Permission denied (os error 13): mkdir '/home/sa/.local/share/pkgx/pantry'
│     at Object.mkdirSync (ext:deno_fs/30_fs.js:132:7)
│     at Path.mkdir (https://deno.land/x/libpkgx@v0.15.0/src/utils/Path.ts:330:12)
│     at default (https://deno.land/x/libpkgx@v0.15.0/src/hooks/useSync.ts:12:42)
│     at ensure_pantry (file:///home/runner/work/pkgx/pkgx/src/app.ts:143:11)
│     at default (file:///home/runner/work/pkgx/pkgx/src/app.ts:38:15)
│     at file:///home/runner/work/pkgx/pkgx/entrypoint.ts:59:9
@mxcl
Copy link
Member

mxcl commented Dec 23, 2023

We create the directory first:

const unflock = await flock(pantry_dir.mkdir('p'))

This is presumably some other docker related issue. We can help you trace it, no suggestions off the top of my head tho. @jhheider ?

@jhheider
Copy link
Contributor

I know the default filesystem driver on docker desktop for Mac causes frequent permission issues. Not looking at them ATM, but the middle one works fine.

@FlatMapIO
Copy link
Author

@jhheider I'm using docker and pkgx in ubuntu.
In containers pkgx seems to try to create ~/.local/state/pkgx, which is a -v path that already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants