Logo
Explore Help
Sign In
xZero707/dockerfiles
1
0
Fork 0
You've already forked dockerfiles
mirror of https://github.com/jessfraz/dockerfiles.git synced 2025-05-08 19:34:42 +02:00
Code Issues Packages Projects Releases Wiki Activity
dockerfiles/znc/znc-shim

12 lines
168 B
Plaintext
Raw Normal View History

Add a shim to znc This serves to do two things: 1) chown /znc to znc:znc, which is really handy if the znc user inside the docker container has a new uid, because the files are stored on the host filesystem. 2) to drop privs to the znc user, to reduce the attack surface.
2014-10-15 20:44:27 -04:00
#!/bin/bash
set -e
ZNC_DIR="/znc"
ZNC_OWNER=$(stat -c "%U" ${ZNC_DIR})
if [ "${ZNC_OWNER}" != "znc" ]; then
chown -R znc:znc ${ZNC_DIR}
fi
exec sudo -u znc "$@"
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.7 Page: 157ms Template: 28ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API