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

'Getting started' fails with permission denied #301

Open
atiaxi opened this issue Aug 9, 2019 · 2 comments
Open

'Getting started' fails with permission denied #301

atiaxi opened this issue Aug 9, 2019 · 2 comments

Comments

@atiaxi
Copy link
Collaborator

atiaxi commented Aug 9, 2019

From the 'Getting started' section of the readme:

bin/bot

This results in:

roger@bionic:~/workspaces/webstorm/pushbot$ ./bin/bot 
Starting pushbot_postgres_1 ... done
npm ERR! path /usr/src/app/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/usr/src/app/node_modules'
npm ERR!  [OperationalError: EACCES: permission denied, mkdir '/usr/src/app/node_modules'] {
npm ERR!   cause: [Error: EACCES: permission denied, mkdir '/usr/src/app/node_modules'] {
npm ERR!     errno: -13,
npm ERR!     code: 'EACCES',
npm ERR!     syscall: 'mkdir',
npm ERR!     path: '/usr/src/app/node_modules'
npm ERR!   },
npm ERR!   stack: "Error: EACCES: permission denied, mkdir '/usr/src/app/node_modules'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/src/app/node_modules'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/pushbot/.npm/_logs/2019-08-08T22_20_45_762Z-debug.log
@smashwilson
Copy link
Owner

Are you on macOS? It looks like Docker for Mac does some magic to make volume mounts readable by non-root users within containers:

https://docs.docker.com/docker-for-mac/osxfs/#ownership

Initially, any containerized process that requests ownership metadata of an object is told that its uid and gid own the object.

If you're on Linux, that would explain it - I doubt Docker does this on its own.

@smashwilson
Copy link
Owner

I've done a little investigation into running entrypoint.sh as root and dropping privileges when spawning the Hubot process and ugh. My temptation to just run the damn thing as root is rising.

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

2 participants