Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Chore: updated chown command in docker.md #197

Merged
merged 1 commit into from
Oct 6, 2019

Conversation

ShawnToubeau
Copy link
Contributor

Updated command in docker.md! Let me know if any other changes are needed
References this issue: #132

@ShawnToubeau
Copy link
Contributor Author

Are the people who open PRs responsible for merging or is that left up to maintainers?

@juanpicado
Copy link
Member

I'm not sure about this after read this. https://stackoverflow.com/questions/34831861/can-i-assume-that-nobody-is-65534 I need more approvals before merge it.

@juanpicado juanpicado requested a review from a team October 6, 2019 18:25
@DanielRuf
Copy link
Contributor

DanielRuf commented Oct 6, 2019

I think this was a misunderstanding. Only members with write access can merge and only if there is at least one successful review.

At least 1 approving review is required by reviewers with write access.

@DanielRuf
Copy link
Contributor

10001 is the normal / arbitary user in a Docker context. Which we already use at https://verdaccio.org/docs/en/docker.html

cat /etc/passwd in our Docker image should show the correct values for the user nobody.

@DanielRuf
Copy link
Contributor

DanielRuf commented Oct 6, 2019

Users:

~ $ cat /etc/passwd
root:x:0:0:root:/root:/bin/ash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
news:x:9:13:news:/usr/lib/news:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucppublic:/sbin/nologin
operator:x:11:0:operator:/root:/bin/sh
man:x:13:15:man:/usr/man:/sbin/nologin
postmaster:x:14:12:postmaster:/var/spool/mail:/sbin/nologin
cron:x:16:16:cron:/var/spool/cron:/sbin/nologin
ftp:x:21:21::/var/lib/ftp:/sbin/nologin
sshd:x:22:22:sshd:/dev/null:/sbin/nologin
at:x:25:25:at:/var/spool/cron/atjobs:/sbin/nologin
squid:x:31:31:Squid:/var/cache/squid:/sbin/nologin
xfs:x:33:33:X Font Server:/etc/X11/fs:/sbin/nologin
games:x:35:35:games:/usr/games:/sbin/nologin
postgres:x:70:70::/var/lib/postgresql:/bin/sh
cyrus:x:85:12::/usr/cyrus:/sbin/nologin
vpopmail:x:89:89::/var/vpopmail:/sbin/nologin
ntp:x:123:123:NTP:/var/empty:/sbin/nologin
smmsp:x:209:209:smmsp:/var/spool/mqueue:/sbin/nologin
guest:x:405:100:guest:/dev/null:/sbin/nologin
nobody:x:65534:65534:nobody:/:/sbin/nologin
node:x:1000:1000:Linux User,,,:/home/node:/bin/sh
verdaccio:x:10001:65533:verdaccio user:/opt/verdaccio:/sbin/nologin

@ShawnToubeau
Copy link
Contributor Author

Thanks for the insight @DanielRuf. What user do we want in this regard? The nobody user or the verdaccio user?

@DanielRuf
Copy link
Contributor

chown is user:group.

The groups are the following:

~ $ cat /etc/group
root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root,adm
lp:x:7:lp
mem:x:8:
kmem:x:9:
wheel:x:10:root
floppy:x:11:root
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:man
cron:x:16:cron
console:x:17:
audio:x:18:
cdrom:x:19:
dialout:x:20:root
ftp:x:21:
sshd:x:22:
input:x:23:
at:x:25:at
tape:x:26:root
video:x:27:root
netdev:x:28:
readproc:x:30:
squid:x:31:squid
xfs:x:33:xfs
kvm:x:34:kvm
games:x:35:
shadow:x:42:
postgres:x:70:
cdrw:x:80:
usb:x:85:
vpopmail:x:89:
users:x:100:games
ntp:x:123:
nofiles:x:200:
smmsp:x:209:smmsp
locate:x:245:
abuild:x:300:
utmp:x:406:
ping:x:999:
nogroup:x:65533:verdaccio
nobody:x:65534:
node:x:1000:node

@DanielRuf
Copy link
Contributor

So for verdaccio:verdaccio or verdaccio:nogroup it is 10001:65533

verdaccio:x:10001:65533:verdaccio user:/opt/verdaccio:/sbin/nologin
nogroup:x:65533:verdaccio

@ShawnToubeau
Copy link
Contributor Author

Which is what this PR lists as the updated user:group
Unless is that not correct? Sorry if I'm failing to follow 😅

@DanielRuf
Copy link
Contributor

Not sure why we had 100:101 in the docs so far. The owner should be the verdaccio user probably.

https://security.stackexchange.com/a/175594

In my opinion 10001:65533should be correct but I did not test this.

@DanielRuf
Copy link
Contributor

Which is what this PR lists as the updated user:group
Unless is that not correct? Sorry if I'm failing to follow 😅

Right. Just explaining the details behind this. These should be the correct values for our Docker image.

Copy link
Contributor

@DanielRuf DanielRuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ShawnToubeau
Copy link
Contributor Author

Gotcha. Thank you for the explanation!

@juanpicado
Copy link
Member

Thanks @DanielRuf , these docs has evolved perhaps with the enough background about the real meaning for our Docker image. Glad we are getting in shape in this area. kudos @sumanbh and @ShawnToubeau 🥇

@juanpicado juanpicado merged commit a4c2ccb into verdaccio:master Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants