check permissions for missing volumes and add comment about permissions on examples
This commit is contained in:
parent
b0ca85ff75
commit
d02985d213
@ -12,14 +12,36 @@ if [ ! -r "/www" ] || [ ! -x "/www" ] ; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# /modsec-confs
|
||||||
|
if [ ! -r "/modsec-confs" ] || [ ! -x "/modsec-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /modsec-confs"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
# /modsec-crs-confs
|
||||||
|
if [ ! -r "/modsec-crs-confs" ] || [ ! -x "/modsec-crs-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /modsec-crs-confs"
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
# /server-confs
|
||||||
|
if [ ! -r "/server-confs" ] || [ ! -x "/server-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /server-confs"
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
# /http-confs
|
||||||
|
if [ ! -r "/http-confs" ] || [ ! -x "/http-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /http-confs"
|
||||||
|
exit 6
|
||||||
|
fi
|
||||||
|
|
||||||
# /etc/nginx
|
# /etc/nginx
|
||||||
if [ ! -r "/etc/nginx" ] || [ ! -x "/etc/nginx" ] ; then
|
if [ ! -r "/etc/nginx" ] || [ ! -x "/etc/nginx" ] ; then
|
||||||
echo "[!] ERROR - wrong permissions on /etc/nginx"
|
echo "[!] ERROR - wrong permissions on /etc/nginx"
|
||||||
exit 3
|
exit 7
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# /acme-challenge
|
# /acme-challenge
|
||||||
if [ ! -r "/acme-challenge" ] || [ ! -x "/acme-challenge" ] ; then
|
if [ ! -r "/acme-challenge" ] || [ ! -x "/acme-challenge" ] ; then
|
||||||
echo "[!] ERROR - wrong permissions on /acme-challenge"
|
echo "[!] ERROR - wrong permissions on /acme-challenge"
|
||||||
exit 4
|
exit 8
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# /etc/letsencrypt
|
# /etc/letsencrypt
|
||||||
if [ ! -w "/etc/letsencrypt" ] || [ ! -r "/etc/letsencrypt" ] || [ ! -x "/etc/letsencrypt" ] ; then
|
if [ ! -w "/etc/letsencrypt" ] || [ ! -r "/etc/letsencrypt" ] || [ ! -x "/etc/letsencrypt" ] ; then
|
||||||
echo "[!] WARNING - wrong permissions on /etc/letsencrypt"
|
echo "[!] ERROR - wrong permissions on /etc/letsencrypt"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -12,18 +12,36 @@ if [ -f "/usr/sbin/nginx" ] ; then
|
|||||||
echo "[!] ERROR - wrong permissions on /www"
|
echo "[!] ERROR - wrong permissions on /www"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
# /modsec-confs
|
||||||
|
if [ ! -r "/modsec-confs" ] || [ ! -x "/modsec-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /modsec-confs"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
# /modsec-crs-confs
|
||||||
|
if [ ! -r "/modsec-crs-confs" ] || [ ! -x "/modsec-crs-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /modsec-crs-confs"
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
|
# /server-confs
|
||||||
|
if [ ! -r "/server-confs" ] || [ ! -x "/server-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /server-confs"
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
# /http-confs
|
||||||
|
if [ ! -r "/http-confs" ] || [ ! -x "/http-confs" ] ; then
|
||||||
|
echo "[!] ERROR - wrong permissions on /http-confs"
|
||||||
|
exit 6
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# /acme-challenge
|
# /acme-challenge
|
||||||
if [ ! -w "/acme-challenge" ] || [ ! -r "/acme-challenge" ] || [ ! -x "/acme-challenge" ] ; then
|
if [ ! -w "/acme-challenge" ] || [ ! -r "/acme-challenge" ] || [ ! -x "/acme-challenge" ] ; then
|
||||||
echo "[!] ERROR - wrong permissions on /acme-challenge"
|
echo "[!] ERROR - wrong permissions on /acme-challenge"
|
||||||
exit 3
|
exit 7
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# /etc/nginx
|
# /etc/nginx
|
||||||
if [ ! -w "/etc/nginx" ] || [ ! -r "/etc/nginx" ] || [ ! -x "/etc/nginx" ] ; then
|
if [ ! -w "/etc/nginx" ] || [ ! -r "/etc/nginx" ] || [ ! -x "/etc/nginx" ] ; then
|
||||||
echo "[!] ERROR - wrong permissions on /etc/nginx"
|
echo "[!] ERROR - wrong permissions on /etc/nginx"
|
||||||
exit 4
|
exit 8
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
- autoconf:/etc/nginx
|
- autoconf:/etc/nginx
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
- ./traefik/traefik.toml:/traefik.toml
|
- ./traefik/traefik.toml:/traefik.toml
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
- ./letsencrypt:/letsencrypt:ro
|
- ./letsencrypt:/letsencrypt:ro
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./joomla-files:/www:ro
|
- ./joomla-files:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
- ./http-confs:/http-confs:ro
|
- ./http-confs:/http-confs:ro
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./apps:/www:ro
|
- ./apps:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./nc-files:/www:ro
|
- ./nc-files:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
- ./modsec-crs-confs:/modsec-crs-confs:ro # disable some false positive
|
- ./modsec-crs-confs:/modsec-crs-confs:ro # disable some false positive
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
- ./server-confs:/server-confs:ro # redirect /app1 and /app2 to /app1/ and /app2/
|
- ./server-confs:/server-confs:ro # redirect /app1 and /app2 to /app1/ and /app2/
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -4,6 +4,8 @@ services:
|
|||||||
|
|
||||||
autoconf:
|
autoconf:
|
||||||
image: bunkerity/bunkerized-nginx-autoconf
|
image: bunkerity/bunkerized-nginx-autoconf
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
- /shared/confs:/etc/nginx
|
- /shared/confs:/etc/nginx
|
||||||
@ -31,6 +33,8 @@ services:
|
|||||||
target: 8443
|
target: 8443
|
||||||
mode: host
|
mode: host
|
||||||
protocol: tcp
|
protocol: tcp
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- /shared/confs:/etc/nginx
|
- /shared/confs:/etc/nginx
|
||||||
- /shared/letsencrypt:/etc/letsencrypt:ro
|
- /shared/letsencrypt:/etc/letsencrypt:ro
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -14,6 +14,8 @@ services:
|
|||||||
mywww:
|
mywww:
|
||||||
image: bunkerity/bunkerized-nginx
|
image: bunkerity/bunkerized-nginx
|
||||||
restart: always
|
restart: always
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
- ./web-files:/www:ro
|
- ./web-files:/www:ro
|
||||||
|
|||||||
@ -8,6 +8,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:8080
|
- 80:8080
|
||||||
- 443:8443
|
- 443:8443
|
||||||
|
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
|
||||||
|
# don't forget to edit the permissions of the files and folders accordingly
|
||||||
volumes:
|
volumes:
|
||||||
- ./wp-files:/www:ro
|
- ./wp-files:/www:ro
|
||||||
- ./letsencrypt:/etc/letsencrypt
|
- ./letsencrypt:/etc/letsencrypt
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user