10000 return true even when chmod fails · linuxserver/docker-bookstack@fc2e4b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc2e4b6

Browse files
authored
return true even when chmod fails
1 parent c705a81 commit fc2e4b6

File tree

1 file changed

+30
-0
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-permissions

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
3+
4+
if [[ -z ${LSIO_READ_ONLY_FS} ]] && [[ -z ${LSIO_NON_ROOT_USER} ]]; then
5+
# permissions
6+
lsiown -R abc:abc \
7+
/var/lib/nginx
8+
9+
chmod -R 644 /etc/logrotate.d
10+
fi
11+
12+
if [[ -z ${LSIO_NON_ROOT_USER} ]]; then
13+
lsiown -R abc:abc \
14+
/config/keys \
15+
/config/log \
16+
/config/nginx \
17+
/config/php
18+
19+
lsiown abc:abc \
20+
/config/www
21+
fi
22+
23+
if [[ -f "/config/log/logrotate.status" ]]; then
24+
chmod 600 /config/log/logrotate.status
25+
fi
26+
27+
chmod -R g+w \
28+
/config/nginx
29+
30+
true

0 commit comments

Comments
 (0)
0