-
Notifications
You must be signed in to change notification settings - Fork 3
/
anon.sh
28 lines (22 loc) · 844 Bytes
/
anon.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
#Anon FTP
#stopping
service vsftpd stop
#making a new conf file
touch /etc/vsftpd-anon.conf
#adding a new folder for anon
mkdir /home/anon_user
#writing the new conf file
echo "listen=YES" > /etc/vsftpd-anon.conf
echo "local_enable=NO" >> /etc/vsftpd-anon.conf
echo "anonymous_enable=YES" >> /etc/vsftpd-anon.conf
echo "write_enable=YES" >> /etc/vsftpd-anon.conf
echo "anon_root=/home/anon_user" >> /etc/vsftpd-anon.conf
echo "anon_max_rate=2048000" >> /etc/vsftpd-anon.conf
echo "xferlog_enable=YES" >> /etc/vsftpd-anon.conf
echo "listen_address= $(hostname -I)" >> /etc/vsftpd-anon.conf
echo "listen_port=21" >> /etc/vsftpd-anon.conf
#adding config file to the vsftpd instance
vsftpd /etc/vsftpd-anon.conf
service vsftpd start
echo [SUCCESS] anon.sh ran by $USER on $(date -u) | tee -a /bin/lib/sh/MK3S/data/MK3S.log