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

Allow to run as non-root user in docker #2682

Open
1 task
ekamil opened this issue Mar 1, 2024 · 1 comment
Open
1 task

Allow to run as non-root user in docker #2682

ekamil opened this issue Mar 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@ekamil
Copy link

ekamil commented Mar 1, 2024

description

I'm running viewtube using docker, i'd like to not have to run it as root to enhance security of my host system.

acceptance criterias

  • the app should work when run with the user that is not uid=0

When I tried I got access errors:

/home/app/node_modules/.pnpm/file-stream-rotator@0.6.1/node_modules/file-stream-rotator/FileStreamRotator.js:672
                        throw e;
                        ^

Error: EACCES: permission denied, mkdir '/home/app/logs/'
    at Object.mkdirSync (node:fs:1391:3)
    at /home/app/node_modules/.pnpm/file-stream-rotator@0.6.1/node_modules/file-stream-rotator/FileStreamRotator.js:669:24
    at Array.reduce (<anonymous>)
    at mkDirForFile (/home/app/node_modules/.pnpm/file-stream-rotator@0.6.1/node_modules/file-stream-rotator/FileStreamRotator.js:656:27)
    at FileStreamRotator.getStream (/home/app/node_modules/.pnpm/file-stream-rotator@0.6.1/node_modules/file-stream-rotator/FileStreamRotator.js:532:5)
    at new DailyRotateFile (/home/app/node_modules/.pnpm/winston-daily-rotate-file@5.0.0_winston@3.11.0/node_modules/winston-daily-rotate-file/daily-rotate-file.js:81:57)
    at Array.<anonymous> (/home/app/server/dist/main.cjs:3071:9)
    at __webpack_require__ (/home/app/server/dist/main.cjs:18924:41)
    at Array.<anonymous> (/home/app/server/dist/main.cjs:2817:78)
    at __webpack_require__ (/home/app/server/dist/main.cjs:18924:41) {
  errno: -13,
  syscall: 'mkdir',
  code: 'EACCES',
  path: '/home/app/logs/'
}

Node.js v18.19.1
@ekamil ekamil added the enhancement New feature or request label Mar 1, 2024
@moisout
Copy link
Member

moisout commented Mar 3, 2024

This is a good suggestion. I will have to do some reading on how to do it!

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

No branches or pull requests

2 participants