Browse Source
Use sftp.app group from 4.2 to manage sftp access, + fix permissions for /var/www/my_webapp
pull/64/head
Use sftp.app group from 4.2 to manage sftp access, + fix permissions for /var/www/my_webapp
pull/64/head
5 changed files with 43 additions and 80 deletions
@ -1,21 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
action=$1 |
|||
pending_dir=$4 |
|||
ssh_conf=$pending_dir/../ssh/etc/ssh/sshd_config |
|||
|
|||
[[ $action == "pre" ]] || exit 0 |
|||
[[ -e $ssh_conf ]] || exit 0 |
|||
|
|||
echo " |
|||
|
|||
##-> __APP__ |
|||
# Hardening user connection |
|||
Match User __APP__ |
|||
ChrootDirectory %h |
|||
ForceCommand internal-sftp |
|||
AllowTcpForwarding no |
|||
PermitTunnel no |
|||
X11Forwarding no |
|||
PasswordAuthentication yes |
|||
##<- __APP__" >> $ssh_conf |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue