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

client/build asset files sometimes have too strict permissions #3612

Closed
fbarl opened this issue May 21, 2019 · 2 comments · Fixed by #3635
Closed

client/build asset files sometimes have too strict permissions #3612

fbarl opened this issue May 21, 2019 · 2 comments · Fixed by #3635
Labels
bug Broken end user or developer functionality; not working as the developers intended it component/build An issue concerning compilation, testing, packaging, distribution

Comments

@fbarl
Copy link
Contributor

fbarl commented May 21, 2019

Running make creates a client/build directory with assets which seem to require sudo permissions to be modified.

That results in e.g. my yarn build crashing with a following error:

fbarl@fbarl-XPS-15-9550 ~/Projects/src/github.com/weaveworks/scope/client $ yarn build
yarn run v1.16.0
$ webpack --config webpack.production.config.js
/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/webpack-cli/bin/cli.js:422
				throw err;
				^

Error: EACCES: permission denied, unlink '/home/fbarl/Projects/src/github.com/weaveworks/scope/client/build/0b5e3a5451fc62d9023ccafc85bc89db.woff'
    at Object.fs.unlinkSync (fs.js:1061:18)
    at rimrafSync (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/rimraf/rimraf.js:306:17)
    at /home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/rimraf/rimraf.js:342:5
    at Array.forEach (<anonymous>)
    at rmkidsSync (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/rimraf/rimraf.js:341:26)
    at rmdirSync (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/rimraf/rimraf.js:334:7)
    at Function.rimrafSync [as sync] (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/rimraf/rimraf.js:304:9)
    at /home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/clean-webpack-plugin/index.js:164:16
    at Array.forEach (<anonymous>)
    at CleanWebpackPlugin.clean (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/clean-webpack-plugin/index.js:90:15)
    at CleanWebpackPlugin.apply (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/clean-webpack-plugin/index.js:191:20)
    at webpack (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/webpack/lib/webpack.js:37:12)
    at processOptions (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/webpack-cli/bin/cli.js:413:16)
    at yargs.parse (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/webpack-cli/bin/cli.js:503:3)
    at Object.parse (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/yargs/yargs.js:567:18)
    at /home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/webpack-cli/bin/cli.js:206:8
    at Object.<anonymous> (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/webpack-cli/bin/cli.js:505:3)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/fbarl/Projects/src/github.com/weaveworks/scope/client/node_modules/webpack/bin/webpack.js:80:2)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command
@fbarl fbarl added bug Broken end user or developer functionality; not working as the developers intended it component/build An issue concerning compilation, testing, packaging, distribution labels May 21, 2019
@fbarl fbarl mentioned this issue May 21, 2019
36 tasks
@shovanmaity
Copy link
Contributor

Hi @fbarl I'd like to work on this.

@bboreham
Copy link
Collaborator

I don't think the problem is permissions, the problem is they are created as root, because the build container is running as root.

Can we docker run it as the current user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken end user or developer functionality; not working as the developers intended it component/build An issue concerning compilation, testing, packaging, distribution
Projects
None yet
3 participants