Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Sometimes we need to copy things between notebooks fast, and therefore it would be a great solution to have an anonymous ftp server running on notebook "A" that is writable by anonymous (of course chrooted, not allowing links), so that notebook "B" can copy/write there.. we need this with vsftpd.. I tried several configs, but it looks like SELinux is preventing this thing to work.. I googled for it (modifying SELinux booleans/SELinux permissions for the /var/ftp directory) but I'm still getting the same error message..

Q: Can someone please copy/paste here a working short config for vsftpd.conf and the SELinux related settings to get this thing working? OS is Scientific Linux 6.3 and vsftpd-2.2.2-11.el6.x86_64..

share|improve this question
add comment

2 Answers

Use netcat (I'm using traditional netcat syntax - package netcat-traditional package from Ubuntu)

dest_machine$ nc -l -p 2222 > copied_dir_tree.tgz

src_machine$ tar czf - dir_tree_to_copy/ | nc dest_machine_ip 2222 

Probably the fastest way (without encryption, with on-fly compression)

share|improve this answer
add comment

As for the vsftpd.conf part, the following works for me (can't help with SELinux, sorry):

anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_root=/tmp/ftp
anon_upload_enable=YES
anon_world_readable_only=YES
anonymous_enable=YES
ascii_upload_enable=YES
connect_from_port_20=YES
dirmessage_enable=YES
listen=YES
local_enable=YES
nopriv_user=ftpsecure
ssl_enable=NO
syslog_enable=YES
write_enable=YES

Note that you can't write inn the anon_root directory - instead you have to create a writeable subdirectory and upload there.

Could possibly NFS be a better option? In version 4 it can even provide transparent encryption if desired.

share|improve this answer
    
selinux is the main problem, the vsftpd config works –  gasko peter Jan 7 '13 at 12:17
    
don't need encryption, We just want to transfer files/dirs from notebook A to notebook B fast (with a direct eth. cable between them) –  gasko peter Jan 7 '13 at 12:18
1  
@gaskopeter even then NFS might be a viable option. Or SSH/SSHFS (the latter would enable native unix commands). –  peterph Jan 7 '13 at 13:24
    
ssh uses encryption, so it's slower –  gasko peter Jan 7 '13 at 15:43
    
@gaskopeter not necessarily - depends on where the bottleneck in the particular case is. There are also patches for kernel (and openssh as well, IIRC) which improve the performance a lot (which however is probably not what you want to look into). –  peterph Jan 7 '13 at 19:28
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.