
This is HOWTO install VSFTPD with possibility to add more users
First u need to stop FTP server from eTrayz web interface
Secon follow this tutorial to instal ipkg and nano
Code:
/opt/
bin/ipkg install xinetd
/opt/bin/ipkg install vsftpd
Config vsftpd:
Code:
/opt/bin/nano /opt/etc/vsftpd.conf
Add this lines at the bottom
Code:
secure_chroot_dir=/opt/usr/share/empty
To lock users in their home directory add this line
Code:
chroot_local_user=YES
To be able to setup write access for users add this line
Code:
user_config_dir=/etc/vsftpd.users
Create folder
Code:
mkdir /etc/vsftpd.users
Now lets create the vsftpd xinetd script
Code:
/opt/bin/nano /opt/etc/xinetd.d/vsftp
Enter the following lines into the file.
Code:
# description: The vsftpd FTP server serves FTP connections.
# it uses normal, unencrypted usernames and passwords for auth
service ftp
{
disable = no
socket_type = stream
user = root
server = /opt/sbin/vsftpd
server_args = /opt/etc/vsftpd.conf
wait = no
nice = 10
only_from = 0.0.0.0/0
}
Now make this script executable
Code:
chmod x /opt/etc/xinetd.d/vsftp
Now make the log file, the default location is /opt/var/log/vsftpd.log
Code:
mkdir -p /opt/var/log
cd /opt/var/log
touch vsftpd.log
Now we can start the xinetd daemon and at the same time, the vsftpd server.
Code:
/etc/init.d/S10xinetd
For autostart
Code:
cp /opt/etc/init.d/S10xinetd /etc/init.d/xinetd
Create user
Code:
cd /etc
/opt/bin/nano passwd
You will now see something like this
Code:
sysadmin:x:500:500:sysadmin:/home/sysadmin:/bin/sh
if we break this down, the format of these lines is as follows:
Code:
username:passwordhash:UserID:GroupID:comment:/my/home/directory/:/shellpath
Now,
lets make a new user, for this guide, we will call the user 'share'. Go
to the bottom of the passwd file and add the following line.
Code:
share::1001:1001:shareuser:/home/share:/bin/sh
Note that we have given the user 'share' shell access. If you want to disable this:
Code:
replace /bin/sh with /sbin/nologin
Now we make the password for the user 'share', type:
Code:
pwconv
passwd share
password
password (again)
Now create access rights for user
Code:
/opt/bin/nano /etc/vsftpd.user/share
Add this lines:
Code:
dirlist_enable=yes
download_enable=yes
write_enable=no
outkastm