mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
sftp chroot hotfixes
This commit is contained in:
parent
c8d45ed139
commit
73b63016d4
2 changed files with 10 additions and 5 deletions
|
@ -22,7 +22,7 @@ source $VESTA/conf/vesta.conf
|
|||
#----------------------------------------------------------#
|
||||
|
||||
check_args '1' "$#" 'USER'
|
||||
validate_format 'user'
|
||||
is_format_valid 'user'
|
||||
if [ -z "$SFTPJAIL_KEY" ]; then
|
||||
exit
|
||||
fi
|
||||
|
@ -51,7 +51,7 @@ fi
|
|||
usermod -a -G sftp-only $user
|
||||
|
||||
# Mouting home directory
|
||||
if [ -z "$(mount |grep $home)" ]; then
|
||||
if [ -z "$(mount |grep /chroot/$user/$home)" ]; then
|
||||
mount -o bind $home /chroot/$user/$home/
|
||||
fi
|
||||
|
||||
|
@ -61,6 +61,6 @@ fi
|
|||
#----------------------------------------------------------#
|
||||
|
||||
# Logging
|
||||
#log_event "$OK" "$EVENT"
|
||||
log_event "$OK" "$ARGUMENTS"
|
||||
|
||||
exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue