diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-08-14 03:10:02 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-08-14 03:10:02 +0200 |
commit | cd57cd5e3fe6916c18908c5ddd4c72745c0b7870 (patch) | |
tree | 010ad2d2679d36438e0f6fc02e1f961931e45dce | |
parent | ceb146ff4df7325d6bce4a5e3b3dd6003f96577c (diff) | |
download | apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.tar.gz apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.tar.bz2 apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.tar.xz apache-cd57cd5e3fe6916c18908c5ddd4c72745c0b7870.zip |
Move user.passwd to /tmp
-rw-r--r-- | 2.4/conf/conf-available/dav.conf | 2 | ||||
-rwxr-xr-x | 2.4/docker-entrypoint.sh | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/2.4/conf/conf-available/dav.conf b/2.4/conf/conf-available/dav.conf index caacd03..f88260d 100644 --- a/2.4/conf/conf-available/dav.conf +++ b/2.4/conf/conf-available/dav.conf @@ -6,7 +6,7 @@ Alias / "/var/lib/dav/data/" AuthType Basic AuthName "WebDAV" - AuthUserFile "/user.passwd" + AuthUserFile "/tmp/user.passwd" <RequireAny> Require valid-user </RequireAny> diff --git a/2.4/docker-entrypoint.sh b/2.4/docker-entrypoint.sh index 3ee4575..3f21549 100755 --- a/2.4/docker-entrypoint.sh +++ b/2.4/docker-entrypoint.sh @@ -49,16 +49,16 @@ if [ "x$AUTH_TYPE" != "x" ]; then fi # Add password hash, unless "user.passwd" already exists (ie, bind mounted). -if [ ! -e "/user.passwd" ]; then - touch "/user.passwd" +if [ ! -e "/tmp/user.passwd" ]; then + touch "/tmp/user.passwd" # Only generate a password hash if both username and password given. if [ "x$USERNAME" != "x" ] && [ "x$PASSWORD" != "x" ]; then if [ "$AUTH_TYPE" = "Digest" ]; then # Can't run `htdigest` non-interactively, so use other tools. HASH="`printf '%s' "$USERNAME:$REALM:$PASSWORD" | md5sum | awk '{print $1}'`" - printf '%s\n' "$USERNAME:$REALM:$HASH" > /user.passwd + printf '%s\n' "$USERNAME:$REALM:$HASH" > /tmp/user.passwd else - htpasswd -B -b -c "/user.passwd" $USERNAME $PASSWORD + htpasswd -B -b -c "/tmp/user.passwd" $USERNAME $PASSWORD fi fi fi |