File transfer

From CAC Documentation wiki
Revision as of 18:50, 16 October 2019 by Srl6 (talk | contribs) (clarifiication of the roles of storage03 and linuxlogin)
Jump to navigation Jump to search

A single, central file server, storage03.cac.cornell.edu, serves nearly all CAC user home directories (except for some private clusters). To work with your files, you can access this server in a variety of ways, from any operating system:

  1. Use a file transfer utility like scp or sftp to copy your files to or from storage03. Connect to linuxlogin to do this, because storage03 is not directly accessible. On linuxlogin, though, your main CAC folder on storage03 is your home folder when connect via ssh, scp, or sftp.
  2. Mount/map your portion of the storage03 filesystem as network share or network drive. On Linux, use the mount command; on Mac, use "Go > Connect to server"; on Windows (including winlogin), enter the UNC address into the address bar of a File Explorer window, or do "Map a network drive". Once the filesystem is mounted, your files on storage03 appear in a folder that you can access just like other folders on your computer.
  3. Use Globus to transfer files to or from storage03. The source or destination of the files must also be a Globus endpoint (and note, you can set up any computer to be a personal endpoint). Endpoints at CAC are described on the File Transfer using Globus page.

Note: by default, your home directory and its contents will be readable and executable by all other users of CAC systems. If this is not what you want, you can change the permissions of the home directory and its files and subdirectories via the standard Linux or Windows mechanisms. However, be aware that this may lead to conflicts for cross-platform applications, as Windows and Linux permissions are not 100% compatible.

Linux and macOS users

Secure Copy

Secure copy is a standard tool to copy files to and from remote hosts.

localhost$ scp localfile.dat username@linuxlogin.cac.cornell.edu:remoteinput.dat
localhost$ scp username@linuxlogin.cac.cornell.edu:results.dat localresults.dat
Secure FTP

FTP is disabled for security reasons, but sftp's interface is nearly identical.

Samba Client

This technique only works from Cornell campus locations or via a Cornell VPN connection. Type

smbclient //storage03.cac.cornell.edu/<user name> -U ctc_ith\\<user name>

(Note, the shell interprets \\ as a single backslash.) Enter the password for your CAC account when prompted. You will see the smb:\> prompt. Now you can start transferring files between your local machine and your CAC home directory, using commands similar to the sftp client. Type help for more instructions.

 -bash-4.1$ smbclient //storage03.cac.cornell.edu/<user name> -U ctc_ith\\<user name>
 Enter ctc_ith\<user name>'s password: 
 Domain=[CTC_ITH] OS=[Unix] Server=[Samba 3.6.23-24.el6_7]
 smb: \> help

Windows users

Secure Copy

The individual who created PuTTY provides a secure copy client called pscp. From the command prompt, type:

cmd> pscp localfile.dat username@linuxlogin.cac.cornell.edu:remoteinput.dat
    <enter your username's password when prompted>
cmd> pscp username@linuxlogin.cac.cornell.edu:results.dat localresults.dat
Secure FTP

FTP is disabled for security reasons, but psftp's interface is nearly identical. From the command prompt, type:

cmd> psftp username@linuxlogin.cac.cornell.edu
    <enter your username's password when prompted>
psftp> put localresults.dat results.dat
psftp> quit