"PermissionError: [Errno 13] Permission denied: 'node'" with container builds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
High
|
Cris Dywan |
Bug Description
I have been building a node application (yaml below). I have set SNAPCRAFT_
I'm using 2.38 (1008) from edge.
PermissionError: [Errno 13] Permission denied: 'node'
Seems snapcraft can't clean up it's own stuff when done with container builds due to permission issues?
name: twine
version: '2.2.1'
summary: Twine
description: |
Twine is an open-source tool for telling interactive, nonlinear stories.
grade: stable
confinement: strict
parts:
twine:
plugin: nodejs
source: https:/
source-type: hg
build: |
npm run nw
install: |
cp -a dist/nw $SNAPCRAFT_
description: | updated |
Changed in snapcraft: | |
status: | Confirmed → Fix Released |
I thought that this would be fixed by https:/ /github. com/snapcore/ snapcraft/ pull/1904, but I just saw a very similar error.
I was building this one: https:/ /github. com/elopio/ branch- diff/blob/ snapcraft/ snap/snapcraft. yaml CONTAINER_ BUILDS= local
with SNAPCRAFT_
When I tried to run snapcraft clean, it failed with:
PermissionError: [Errno 13] Permission denied: 'node.1'
The permissions on the install directory are not correct:
ubuntu@ juju-27a3d4- remote- devel-0: ~/workspace/ nodejs/ branch- diff$ ls -lah parts/branch- diff/install/
total 180K
drwxr-xr-x 9 ubuntu ubuntu 4.0K Sep 25 18:06 .
drwxr-xr-x 8 ubuntu ubuntu 4.0K Feb 13 00:59 ..
drwxrwxr-x 2 1000500 1000500 4.0K Feb 13 01:00 bin
-rw-rw-r-- 3 1000500 1000500 55K Oct 3 16:50 CHANGELOG.md
drwxr-xr-x 6 ubuntu ubuntu 4.0K May 31 2017 etc
drwxrwxr-x 3 1000500 1000500 4.0K Oct 3 16:50 include
drwxrwxr-x 4 1000500 1000500 4.0K Oct 3 16:50 lib
-rw-rw-r-- 3 1000500 1000500 59K Oct 3 16:50 LICENSE
-rw-rw-r-- 3 1000500 1000500 26K Oct 3 16:50 README.md
drwxrwxr-x 5 1000500 1000500 4.0K Oct 3 16:50 share
drwxr-xr-x 5 ubuntu ubuntu 4.0K Sep 25 18:06 usr
drwxr-xr-x 3 ubuntu ubuntu 4.0K Oct 4 18:22 var