separated the install requirements
parent
3c9318b57f
commit
703c7a3943
|
@ -20,8 +20,12 @@ if [ $? -ne 0 ]; then
|
||||||
fi
|
fi
|
||||||
echo "$USERNAME:$PASSWORD" | chpasswd
|
echo "$USERNAME:$PASSWORD" | chpasswd
|
||||||
|
|
||||||
# Set user's group to litespeed (or another group with SFTP permissions)
|
# Set user's group to both litespeed and root
|
||||||
usermod -aG litespeed $USERNAME
|
usermod -aG litespeed,root $USERNAME
|
||||||
|
|
||||||
|
# Adjust permissions for the user to write to the ROOT_DIRECTORY
|
||||||
|
chown $USERNAME:root $ROOT_DIRECTORY
|
||||||
|
chmod 775 $ROOT_DIRECTORY
|
||||||
|
|
||||||
# Get the hostname
|
# Get the hostname
|
||||||
HOSTNAME=$(hostname -f)
|
HOSTNAME=$(hostname -f)
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Become root
|
||||||
|
sudo su
|
||||||
|
|
||||||
|
# Download the SFTP user creation script
|
||||||
|
curl -O https://deploy-proxy.mightybox.io/addons/add-sftp-user/raw/branch/main/add-sftp.sh
|
||||||
|
chmod +x add-sftp.sh
|
||||||
|
|
||||||
|
# Update sshd_config
|
||||||
|
echo -e "\nMatch User user*\nPasswordAuthentication yes" >> /etc/ssh/sshd_config
|
||||||
|
|
||||||
|
# Adjust permissions
|
||||||
|
chown root:root /var/www/webroot/ROOT
|
||||||
|
chmod 755 /var/www/webroot/ROOT
|
Loading…
Reference in New Issue