Created
July 28, 2017 13:29
-
-
Save nadirs/0d66a1af1350e7ff6078212d9cdc5969 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useradd $1 | |
mkdir /home/$1/www | |
chown root /home/$1 | |
echo "/some/external/dir /home/$1/www none rw,bind" >> /etc/fstab | |
mount -a | |
echo " | |
Match User $1 | |
ChrootDirectory /home/$1 | |
ForceCommand internal-sftp | |
" >> /etc/sshd_config | |
service sshd reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment