Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

System: Linux Ubuntu 10.04

I have set up a vsftpd server and everythings seems to work fine if you log in over a browser, but if I log in using winscp then I can navigate out of my own home directory which is avtually restricted by the config file (below)

Does anyone know why this would happen? I need to be sure that noone can rumage around on my server looking at files.

Here is my VSFTPD config file:

listen=YES 
anonymous_enable=NO 
local_enable=YES 
write_enable=YES
dirmessage_enable=YES 
use_localtime=YES 
xferlog_enable=YES 
connect_from_port_20=YES 
chroot_list_file=/etc/vsftpd.chroot_list 
secure_chroot_dir=/var/run/vsftpd/empty 
pam_service_name=vsftpd 
chroot_local_user=NO 
chroot_list_enable=YES
share|improve this question

migrated from stackoverflow.com Jan 18 '12 at 20:19

This question came from our site for professional and enthusiast programmers.

    
Here is my config file VSFTPD config file: listen=YES anonymous_enable=NO local_enable=YES write_enable=YES dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES chroot_list_file=/etc/vsftpd.chroot_list secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd chroot_local_user=NO chroot_list_enable=YES –  Robert Buckley Jan 18 '12 at 18:18

3 Answers 3

vsftpd is a FTP server, but you're using WinSCP, which is a SCP client (a file copying protocol over SSH). These are two totally different services so you can configure vsftpd all you want, it won't impress your WinSCP ;-) To actually access your server via FTP, you need an FTP client.

share|improve this answer

Set chroot_local_user to YES. After this the chroot_list_file will be a list of users not to lock into their home directories, so disable it unless you have such users as well.

share|improve this answer

Thanks for the advice. The way out of this was firstly to understand that ftp is not sftp as DarkDust said. I Found that by using Filezilla which uses FTP and not SFTP everything works as expected. But I didn´t realise that if you use the same login with an sftp server you can navigate to wherever you want. MY solution was to add "denyuser username" in the /etc/ssh/ config file which restrict sftp access to the server. The only way in is then only FTP which works as the VSFTPD server configuration should!

Thanks again,

Rob

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.