Re: Howto: Easy FTP with vsftpd
It not that odd, I think.
Check the vsftpd FAQ (2nd question).
It's how vsftpd works with folders outside chroot users folders. As an example here is how to do it:
http://www.ducea.com/2006/07/27/allo...ectory-chroot/
I don't know any other way to do it, sorry.
Re: Howto: Easy FTP with vsftpd
That approach did the trick :), thanks!
But it leads me to another problem: file permissions
My ftp users are able to upload (write).
But they should only be able to read these folders:
/home/ftp/HL
/home/ftp/#MP3
With my current configuration they are able to delete and write files in the those folders.
I don't won't to chmod 755 these folders because I want still to be able to write in these folders as pc user (not ftp).
How do I solve this problem :confused:
Re: Howto: Easy FTP with vsftpd
Or how do I create a user that can only read:
/home/ftp/HL
/home/ftp/#mp3
And another user that can only upload in /home/ftp/upload
:confused:
Re: Howto: Easy FTP with vsftpd
That should be simple to do. You should enable write permissions to users (all) with:
but disable write permission to anonymous with:
Code:
anon_upload_enable=NO
NOTE: if you DO enable anonymous to write/upload files, you should change the default owner of those files (for security reasons) with:
Code:
chown_upload=YES
chown_username=some_username_with_write_permission_on_the_directory
Re: Howto: Easy FTP with vsftpd
Another note:
If you want to add certain setting to individual users, create a directory that will have the settings of those users:
Code:
sudo mkdir /etc/vsftpd_user_conf
Edit vsftp configuration file to read that directory:
Code:
sudo nano /etc/vsftpd.conf
and set the user_config_dir variable (non-existent in the default configuration file) to read that directory:
Code:
user_config_dir=/etc/vsftpd_user_conf
Inside the /etc/vsftpd_user_conf directory, create a file named with the username of the "exception" user and set the variables/options that you want him/them to have as exceptions to the default configuration. For various users, various files, each one with different settings if you want.
Don't forget to restart vsftp each time you change its configuration
Code:
sudo /etc/init.d/vsftpd restart
Re: Howto: Easy FTP with vsftpd
Does anyone know a easy way to keep track of your vsftpd, so that I know when people have uploaded files (or connected). Ideally, I'd just like a terminal window showing ftp activity.
Re: Howto: Easy FTP with vsftpd
Hi moojs,
you can track vsftpd activity on the usual place, in the /var/log/ directory in the vsftpd.log file.
Re: Howto: Easy FTP with vsftpd
i get this error when i try to log in:
ftp: SSL_connect error error:140943FC:SSL routines:SSL3_READ_BYTES:sslv3 alert bad record mac
When i try to connect to from a pc on my lan to my server that's also on my lan it works fine with ssl. I'm using filezilla too. But from outside my lan i get that error.
can anyone help me with this plz?
Re: Howto: Easy FTP with vsftpd
I have a problem too, I have like three days trying to set up vsftpd with no little or no success at all, Im trying to do the following:
user anonymous: read several folders, but dont write anything, I will mount the folders like you explained earlier.
my local user: full access to /home/user name
I reached this configuration so far:
listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
anon_upload_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=mike
idle_session_timeout=300
data_connection_timeout=120
ftpd_banner=Welcome to Mike's FTP server
chroot_local_user=YES
chroot_list_enable=NO
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
local_root=/home/mike
force_dot_files=YES
hide_ids=YES
max_per_ip=1
max_clients=6
pasv_min_port=1025
pasv_max_port=1125
with this I can connect locally, (ftp localhost) and it works, but right now Im not in my home and I cant access the server,it says connection refused, the connection is working because I can see my page and access to my box via ssh and scp, any advice? Im I doing something wrong?
Thnx in advance folks
Re: Howto: Easy FTP with vsftpd
epimeteo
I followed your howto ftp with vsftpd. When i use filezilla i can log in until i get this
Response: 425 security: Bad IP Connecting
Error: Failed to retrieve directory listings
Assuming a followed your directions, why would I get this error?
Thanks