Skip to content

Commit e963304

Browse files
committed
Check if user home exists before set permission on sftp jail.
1 parent 29482d7 commit e963304

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
2222
- v-generate-api-key: Fixed wrong quotes used for default keys folder location.
2323
- Fixed permissions to allow access for FTP users created in web domains under admin account.
2424
- Removed obsolete Vesta Filemanager files completely.
25+
- Check if user home exists before set permission on sftp jail.
2526

2627
## [1.0.4] - 2019-07-09 - Hotfix
2728
### Bugfixes

bin/v-add-user-sftp-jail

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ users=$(IFS=',';echo "${users[*]// /|}";IFS=$' \t\n')
5656
sed -i "s/$ssh_users/$users/g" /etc/ssh/sshd_config
5757

5858
# Set home folder permission to root
59-
chown root:root /home/$user
59+
if [ -d "/home/$user" ]; then
60+
chown root:root /home/$user
61+
fi
6062

6163
#----------------------------------------------------------#
6264
# Hestia #

0 commit comments

Comments
 (0)