diff options
-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 |