Skip to content

Commit

Permalink
modify /home to corrent permissions while it may be mounted with wron…
Browse files Browse the repository at this point in the history
…g permissions
  • Loading branch information
eshizhan authored Nov 18, 2023
1 parent eacf693 commit fd87bcb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions files/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ if [ ! -f "$userConfFinalPath" ]; then

# Check that we have users in config
if [ -f "$userConfFinalPath" ] && [ "$(wc -l < "$userConfFinalPath")" -gt 0 ]; then
if [ -n "$(find /home -perm /go=w -o \! -user root -maxdepth 0)" ]; then
log "Modify /home to have the correct permissions, as it may be mounted with the wrong permissions."
chmod go-w /home
chown root /home
fi
# Import users from final conf file
while IFS= read -r user || [[ -n "$user" ]]; do
create-sftp-user "$user"
Expand Down

0 comments on commit fd87bcb

Please sign in to comment.