docker-inotify-command icon indicating copy to clipboard operation
docker-inotify-command copied to clipboard

groupadd/useradd command not found

Open grahamPegNetwork opened this issue 4 years ago • 1 comments

I'm not sure where the issue is, but it seems I ran into some issues with the runas.sh script as follows:

inotify    | /files/runas.sh: line 82: groupadd: command not found
inotify    | /files/runas.sh: line 83: useradd: command not found
inotify    | chown: unknown user/group user_1000_1000:group_1000_1000
inotify    | [2021-02-12 08:12:20] Running command as user "user_1000_1000"...
inotify    | setuser: user user_1000_1000 not found

I set user/group IDs to 1000 as that is my current user, everything else is fairly normal in the config file from what I can tell. Right now I'm just trying to run a test, outputting anything to a local file.

grahamPegNetwork avatar Feb 12 '21 08:02 grahamPegNetwork

This is due to commit https://github.com/coppit/docker-inotify-command/commit/e65260ff523b4637b4b511229f2d8e6a936d6b4b where base image was changed to Alpine. As Alpine uses adduser/addgroup instead of useradd/groupaddg, the commands used in runas.sh can't be found.

The script needs updating or you have to add user/group, in the container, with the same id as is used on the host. If the id exist, runas.sh won't try to create a new user/group.

pdahlman avatar Jun 04 '21 09:06 pdahlman