cant upload files on ubuntu 12.04.2 LTS using vsftpd
Hey Guys
I can not upload files onto my ubuntu 12.04.2 lts using vsftpd (getting permission denied) and having problems jailing users only to there home directory. Is there anyway to get this working correctly? |
anybody?
|
Hi
Is SELinux enabled on the server? run Code:
getsebool -a | grep ftp Code:
write_enable |
here is what I get:
Code:
tim@userpages:~$ getsebool -a | grep ftp Code:
# Example config file /etc/vsftpd.conf |
I finally got it to work by doing these steps:
Edit your /etc/ssh/sshd_config file with your favorite text editor: vim /etc/ssh/sshd_config Add this block of settings to the end of the file: File excerpt:/etc/ssh/sshd_config Match group sftponly ChrootDirectory %h X11Forwarding no AllowTcpForwarding no ForceCommand internal-sftp Save the changes to your file. Restart OpenSSH: /etc/init.d/ssh restart Add users: sudo useradd -d /home/testuser -m testuser sudo passwd testuser Modify User Accounts Create a group for users whom you want to restrict to SFTP access: addgroup sftponly Modify the user accounts that you wish to restrict to SFTP. Issue the following commands for each account, substituting the appropriate username. Please keep in mind that this will prevent these users from being able to log into a remote shell session. usermod -G sftponly username chown root:root /home/username chmod 755 /home/username Next, you need to create new directories for each user, to which they will have full access. Issue the following commands for each user, changing the directories created to suit your needs: cd /home/username mkdir docs public_html chown username:sftponly * |
Well, you didn't get vsftpd working. Openssh sftp has nothing at all to do with vsftpd.
|
Ok tell me what I need to do get vsftpd on ubuntu 12.04 because its not working on port 21 but only works on port 22.
|
If you've got what you need via ssh, that's fine.
vsftpd is just a different service and you don't need it any more. Personally I prefer ssh/scp/sftp anyway & they're more secure. Shutdown & remove vsftpd and stick with your soln. Also amend iptables/firewall to match. |
Quote:
To clarify, vsftpd is an ftp server. ftp is an old and insecure file transmission protocol. Transmissions are not encrypted, and passwords are sent in the clear. Openssh enables fully encrypted communications. Passwords are sent encrypted, and passwordless private/public key authentication can optionally be used instead of passwords, which adds additional security. Openssh provides more than just a secure replacement for ftp. It replaces a number of old inscure protocols. The rlogin and telnet commands are replaced with the ssh program, rcp is replaced with scp, and ftp is replaced with sftp. That said, if you want to get vsftpd working too, despite its shortcomings, we can work on that. What are the specific error messages you get when trying to upload? You mentioned permission erros. Also, what version of vsftpd are you running? The allow_writeable_chroot=YES is inadvisable, but in addition, it only works in version 3.0 and higher. |
All times are GMT -5. The time now is 01:06 AM. |