3

I have two computers, one with Ubuntu 14.04 (PC1), the other one with Windows-7 (PC2). I have a >2GB file to transfer from PC1 to PC2 and I got a timeout message by using the usual way, i.e. using the menu of gnome-classic (network, windows icon, etc). Therefore I did this in my home directory:

sudo mount -t cifs //PC2/PARTAGE/ Windows/ -o  username=USERNAME,rw,user,file_mode=0777,dir_mode=0777

And that works ! The directory ${HOME}/Windows of PC1 is mounted on //PC2/PARTAGE (partage = share in English, it is the name of my shared folder)

BUT the transfer rate is about 14MBytes/s, instead of 50-70MBytes/s as usual (PC1 and PC2 are related to each other by a gigabit switch, I never reach 100MBytes/s probably because of the ethernet cables).

Why is this method slower ? It is my question. What is wrong in this method ?

Mitch
  • 4,697
Philippe Gaucher
  • 2,004
  • 2
  • 21
  • 33

2 Answers2

4

This issue may be that you are mounting it as a filesystems etc, which is more complicated - using FTP (File Transfer Protocol) would be ideal for this, as it just transferring a file. To use it you first need to install a server (probably easiest on the Ubuntu machine) - you can do that with:

sudo apt-get install vsftpd

You then need to edit the security settings so not anyone can log in - you can do this by running sudo nano /etc/vsftpd.conf, and replacing anonymous_enable=YES with anonymous_enable=NO. You may also want to set the write_enable entry, depending on whether you want to allow files to be created over FTP or not. You can then save (Ctrl+O) and exit (Ctrl+X).

You then need to restart vsftpd (I think this is the right command...)

sudo /etc/init.d/vsftpd restart 

You then need a FTP client (on the Windows machine) to access the FTP server - for Windows FileZilla is good, but is hosted on Sourceforge, which now sadly has many ad fake download links, and now has adware installers for some of the more popular apps12 (I don't think the version FileZilla_3.9.0.6_win32-setup.exe here has this issue (though it did - looks fine under Wine anyway)) - basically don't use the installer if it looks like this:

enter image description here

You can then enter the IP address and login details of the Ubuntu machine, and transfer the files.

NOTE: Note if you want something potentially more secure you can use SFTP - this can be done by using a SSH server on the Linux machine (using the openssh packages), and sftp in Filezilla.

Wilf
  • 30,194
  • 17
  • 108
  • 164
  • 2
    There is another ftp/sftp client : WinSCP (http://winscp.net/). By using the ftp server above and a ftp client on Windows-7, the transfer rate reaches the 100MBytes/s : so my ethernet cables are very good. I already had a ssh server on my linux machine. By using the sftp client feature of WinSCP, I have a transfer rate of about 15MBytes/s, like mounting the windows partition as a filesystem. So the reason here is the encryption I guess. To summarize, your method works. And no timeout anymore of course. – Philippe Gaucher Nov 04 '14 at 05:16
  • So the transfer rate between linux and windows is ~60MBytes/s by samba, ~100MBytes/s by ftp, ~15MBytes/s by mounting as a filesystem and by sftp. – Philippe Gaucher Nov 04 '14 at 05:26
  • 1
    There is safe version of filezilla at http://portableapps.com/apps/internet/filezilla_portable – Artem P Jan 05 '16 at 16:38
  • @hlcs also https://ninite.com/ I think (currently...) I'm not sure but I think there are some safe download links from the Filezilla project page. – Wilf Jan 05 '16 at 16:52
  • 1
    winscp is quite easy to use, I recommend that. Also, instead of using IP, you can just use the machine name if on the local network – wordsforthewise Jul 28 '17 at 17:33
-1

Install sftp package on Ubuntu machine:

sudo apt-get update

sudo apt-get install vsftpd

Now it's working fine.