Commit 12c88e2c authored by Danilo Bargen's avatar Danilo Bargen

Entrypoint: Ensure that uploaded files are not executable

Signed-off-by: 's avatarDanilo Bargen <mail@dbrgn.ch>
parent bb9dfa1e
......@@ -29,8 +29,10 @@ fi
# Change owner and permission if filesystem backend is used and user has root permissions
if [ "$UID" -eq 0 ] && [ "$CMD_IMAGE_UPLOAD_TYPE" = "filesystem" ]; then
if [ "$UID" -eq 0 ]; then
echo "Updating uploads directory permissions ($UPLOADS_MODE)"
chown -R hedgedoc ./public/uploads
chmod $UPLOADS_MODE ./public/uploads
find ./public/uploads -type f -executable -exec chmod a-x {} \;
else
echo "
#################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment