UBERFTP(1)
π NAME π
UBERFTP(1) is the manual for uberftp β a GridFTP-enabled client. That's the whole vibe. She's giving secure, parallel, striped file-transfer energy. Periodt. π
β¨ SYNOPSIS β¨
okay bestie, here's the lineup:
uberftp [options] [host options] [host]
uberftp [options] [host options] host βcmdβ
uberftp [options] srcurl dsturl
uberftp [options] -f urlfile
uberftp [options] -cmd url
π¦ DESCRIPTION π¦
okay so uberftp is a GridFTP-enabled client that supports both interactive use and FTP commands on the uberftp command line to transfer files between two computers. It's intended for use with computers that have a GridFTP server installed. Uberftp supports GSI authentication, parallel data channels and striping. For more information about GridFTP, see the GridFTP URL in the "SEE ALSO" section below.
Only the first usage shown above will create an interactive session. If host is specified, uberftp immediately attempts to establish a connection to the GridFTP server on host, enters its command interpreter and awaits commands from the user. If host is not specified, uberftp immediately drops into the command interpreter without connecting to any GridFTP server.
The second usage option denotes a non interactive session in which βcmdβ is a series of one or more commands as described in the COMMANDS section below to run once the control connection is established. These commands are run exactly as if they had been entered from the interactive prompt. This list must be enclosed in quotes. Multiple commands are semicolon or comma delimited. uberftp will execute these commands and then exit. Uberftp will exit upon the first error encountered.
The third and fourth usage statements use the URL style format for specifying the source and destination for the files to transfer. The third usage statement places these URLs on the command line. The fourth usage allows the user to specify multiple URL pairs in a separate file for Uberftp to transfer one at a time. The supported URL syntaxes are gsiftp://[user@]host[:port]/file, ftp://[user[:pass]@]host[:port]/file and file://path.
The fifth usage statement allows for commands that take pathnames to accept URLs instead. The allowable commands are listed in the -cmds section below.
πΈ HOST OPTIONS πΈ
-P portβ connect toportinstead of the default. The default for GSI authentication is2811. The default for password authentication is21.-u userβ connect asuser. This is useful for both password and GSI authentication mechanisms.-p passβ usepasswhen authenticating. IfpassequalsX, UberFTP will prompt for the password with character echoing turned off.
π OPTIONS π
-activeβ use ACTIVE mode for data transfers.-asciiβ use ASCII mode for data transfers.-binaryβ use BINARY mode for data transfers.-blksize nβ set the internal buffer size ton.-cksum [on|off]β enable/disable CRC checks after file transfers.-cos nameβ set the storage class of service toname. Used with HPSS installations. Use the class of service namedefaultto allow the remote server to decide which class of service to use.-dβ enable debugging. Same as-debug 3. Deprecated.-debug nβ set the debug level ton.-family nameβ set the storage family toname. Use the family namedefaultto allow the remote server to decide which family to use.-glob [on|off]β enable/disable filename expansion.-hashβ enable printing of hash marks during transfers.-keepalive nβ send control channel keepalive messages everynseconds during data transfers.-mode [E|S]β switch the transfer mode to extended block (E) or streams mode (S).-parallel nβ usenparallel data channels during extended block transfers.-passiveβ use PASSIVE mode for data transfers.-pbsz nβ set the data protection buffer size tonn bytes.-prot [C|S|E|P]β set the data protection level to clear (C), safe (S), confidential (E) or private (P).-retry nβ retry commands that fail with transient errorsntimes.-resume pathβ retry the recursive transfer starting atpath.-tcpbuf nβ set the TCP read/write buffers tonbytes.-waitβ this will cause the client to wait for remote files to stage before attempting to transfer them.-vβ print UberFTP version information and exit.-versionβ print UberFTP version information and exit.-versionsβ print version information about all used globus modules and exit.
π Supported -cmds π
-cat urlβ print to stdout the contents of the remote file. See CAT BEHAVIOUR below for details about the behaviour of this functionality.-chgrp [-r] group urlβ set the group ownership of the remote object(s).-chmod [-r] perms urlβ set the permissions of the remote object(s).-dir [-r] urlβ list the contents of the remote object.-link url pathβ create a hardlink named<path>to the remote object.-ls [-r] urlβ list the contents of the remote object.-mkdir urlβ create the remote directory.-rename url pathβ rename the remote object to the givenpath.-rm [-r] urlβ remove the remote object(s).-rmdir urlβ remove the remote directory.-size urlβ return the size of the remote object.-stage [-r] seconds urlβ attempt to stage the remote object(s) over the time period given inseconds.-symlink url pathβ create a symlink named<path>to the remote object.
π DEFAULT TRANSFER MODE π
By default, without any special environment variables, command line options or commands, uberftp will transfer files in PASSIVE STREAMS mode. PASSIVE means that the client will initiate the data connection which is useful for users behind firewalls. STREAMS mode implies that GRIDFTP features including striping and parallel data connections are not used. In order to take advantage of these features with GridFTP capable servers, you must either change the mode directly using -m command line switch or the mode interactive command, or you can change the mode indirectly by specifying more than one parallel data connection using the -c command line switch or by using the parallel interactive command.
π§ GETTING YOUR GSI PROXY π§
By default, uberftp requires a GSI certificate. If you do not already have a certificate, see the following web page to learn how to get one:
http://www.ncsa.uiuc.edu/UserInfo/Grid/Security/GetUserCert.html
Once you have a certificate, use the grid-proxy-init command to get a valid proxy.
π COMMANDS π
! [command]β run thecommandusing a shell on the local machine. If nocommandis given, invoke an interactive shell.? [command]β ifcommandis given, print a (hopefully) helpful blurb about it. Otherwise, list all commands.activeβ change to ACTIVE mode which causes the server to initiate the data connection. The default is PASSIVE mode unless the variableUBERFTP_ACTIVE_MODEis set in the environment. If you are behind a firewall you must use PASSIVE mode.asciiβ change the data transfer type to ASCII which causes the server to do some simple transformations to the file being transferred. This is mostly useful for changing EOL (end of line) in text files when moving between platforms. This option is almost never necessary today. The default is BINARY mode also known as IMAGE mode.binaryβ change the data transfer type to BINARY (aka IMAGE) which causes the server to not perform transformations to the file being transferred. This is the default and is faster than an ASCII transfer.blksize sizeβ change the size of the memory buffer used to read and write data to disks tosizebytes. The default block size is1024*1024(1048576) bytes but it can be changed at compile time. The block size can be increased to improve file transfer performance. This is not related to the extended block mode block size used to determine the ratio of data to header for data transferred on the data channel.bugsβ prints information regarding bug reporting and feature requests.byeβ close all control and data connections and exit.cat file1 [file2 ... filen]β print the contents of the remote file(s) to stdout. See CAT BEHAVIOUR below for details about the behaviour of this functionality.cdupβ change the remote working directory up one level.cd [dir]β change the remote working directory todir. Ifdiris not given, the client will make every attempt to change to the user's home directory.chgrp [-r] group object [object2 ... objectn]β change group ownership on the remote object(s).-rβ recursively chgrp everything in the given directory.
chmod [-r] perms object [object2 ... objectn]β change permissions on the remote object(s).-rβ recursively chmod everything in the given directory.
closeβ close the control connection to the remote host.cksum [on|off]β enable file cksum comparison after each file transfer. This only works with NCSA's mass storage system.onβ enable checksum comparisonoffβ disable checksum comparison
cos nameβ sets the HPSS class of service tonameon the FTP service if the service supports it. Ifnameis omitted, the current class of service is printed. Use the class of service namedefaultto allow the remote server to decide which class of service to use.dcau [N|A|S subject]β change the data channel authentication settings. If the service does not support DCAU, these settings are ignored.Nβ disabled dcau.Aβ expect the remote identity to be mine. (Default)S subjectβ expect the remote identity to besubject.
debug [0-3]β turn debug statements on/off. If no value is given, this command will toggle betweendebug(2)and non debug(1) mode. Otherwise the debug level is set to the given level.0β only errors are printed1β default. Errors and some helpful messages are printed2β print useful control channel information3β print all information
family nameβ sets the tape family tonameon the FTP service if the service supports it. Ifnameis omitted, the current family is printed. Use the family namedefaultto allow the remote server to decide which family to use.glob [on|off]β turn filename globbing on or off, bestie. Give it no option at all and it just flips whatever the current setting is, like a lil light switch β¨onβ enable filename globbingoffβ disable filename globbing
dir [-r] [target]β lists everything chillin' inside the remotetargetdirectory. Iftargetisn't given, it just uses the current working directory, nbd.-rβ recursively listtarget.targetβ directory or file to list.'.'is used by default.
get [-r] source [destination]β pull file(s) down from the remote service π«³ Ifsourceimplies multiple transfers β whether that's through regular expressions or by using the recursive feature β thendestinationhas to be a directory. Nodestinationspecified? Thensourceis used.-rβ recursively transfer the given directory.
hashβ prints hash marks while data transfers are happening, the classic lil progress vibe. Lowkey important: this does not work during third party transfers. πhelp [command]β if you hand it acommand, it prints a helpful blurb all about thatcommand. If not, it just lists all the commands. Very demure, very mindful.keepalive [seconds]β tries to stop the control channel from getting blocked by firewalls during long data channel operations. UberFTP sends aNOOPcommand to the service at intervals equal to the number ofsecondsyou specify. Set it to zero and keepalive is disabled. Don't give itsecondsand it just shows you the current timeout. This feature is disabled by default, fyi.secondsβ number of seconds betweenNOOPs. Disabled if zero.
lcat file1 [file2 ... filen]β prints the contents of the local file(s) straight to stdout. Peep CAT BEHAVIOUR below for the details on how this functionality behaves.lcd [dir]β change the local working directory todir. Nodir? Then the client will make every attempt to change to the user's home directory. It's trying its best, okay πlcdupβ change the local working directory up one level. Just one. One level. πlchgrp [-r] group object [object2 ... objectn]β change group ownership on the local object(s).-rβ recursivelychgrpeverything in the given directory.
lchmod [-r] perms object [object2 ... objectn]β change permissions on the local object(s).-rβ recursivelychmodeverything in the given directory.
lcloseβ close the control connection to the local host. bye bestie πldir [-r] [target]β lists the contents of the localtargetdirectory. Notargetgiven? Then the current working directory is used.-rβ recursively listtarget.targetβ directory or file to list.'.'is used by default.
link [oldfile] [newfile]β create a hardlink tooldfilenamednewfileover on the remote service.llink [oldfile] [newfile]β create a hardlink tooldfilenamednewfileon the local service.lls [-r] [target]β lists the contents of the localtargetdirectory. Iftargetisn't given, the current working directory is used.-rβ recursively listtarget.targetβ directory or file to list.'.'is used by default.
llscosβ list the available class of services on the local server (HPSS only).llsfamβ list the available tape families on the local server (HPSS only).lmkdir dir1 [dir2 ... dirn]β create the local directory(ies). So many dirs, so little time πlopen [-P port] [-u user] [-p pass | X] hostβ opens a control channel tohost, and thathostbecomes the 'local' machine. Once you've usedlopen, every local (l*) command does its thing onhostinstead of on the local machine. This is literally how third party transfers get accomplished. GSI authentication is used unless the-poption is used.-P portβ connect toport(default2811for GSI,21for password).-u userβ connect as alternate user.-p pass | Xβ use passwordpasswhen authenticating withhost. IfpassequalsX, read the password from STDIN with character echoing turned off.hostβ connect tohost.
lpwdβ prints the current local working directory. You are here πlrename src dstβ rename the local objectsrctodst.lrm [-r] object1 [object1...objectn]β removes the local file system object(s).-rβ recursively remove the given directory.
lrmdir dir1 [dir2...dirn]β removes the given directories from the local service.lquote cmdβ passcmdto the local FTP service. This is your backstage pass ποΈ letting you use server-specific commands that aren't available through the uberftp interface.ls [-r] [target]β lists the contents of the remotetargetdirectory. If[target]isn't given, then the current working directory is used.-rβ recursively listtarget.targetβ directory or file to list.'.'is used by default.
lscosβ list the available class of services on the remote server (HPSS only).lsfamβ list the available tape families on the remote server (HPSS only).lsize file1 [file2...filen]β prints the size of the given object(s). Big file energy π₯lstage [-r] seconds object1 [object2...objectn]β attempt to stage all matching files within the given number of seconds on the local service.secondsβ number of seconds to attempt staging-rβ recursively stage all files in the given subdirectory.
lsymlink [oldfile] [newfile]β create a symlink tooldfilenamednewfileon the local service.mput [-r] object1 [object2...objectn]β retrieve file(s) from the remote service. This is similar to making multiple calls togetwithout specifying a destination.-rβ recursively transfer the given directory.
mkdir dirβ create the remote directory.mode [E|S]β toggle the data transfer mode between Streams mode and Extended Block mode. Default is Streams mode. Give it no option and it'll display the current mode.Eβ Extended block modeSβ Streams mode
mput [-r] object1 [object2...objectn]β store file(s) to the remote service. This is similar to making multiple calls toputwithout specifying a destination. (yep bestie, same name as above, totally different job π)-rβ recursively transfer the given directory.
open [-P port] [-u user] [-p pass | X] hostβ opens a control channel tohost, and thathostbecomes the 'remote' machine. GSI authentication is used unless the-poption is used.-P portβ connect toport(default2811for GSI,21for password).-u userβ connect as user.-p pass | Xβ use passwordpasswhen authenticating withhost. IfpassequalsX, read the password from STDIN with character echoing turned off.hostβ connect tohost.
order [type]β changes the order of the lists returned fromlsandllsto the given scheme. Iftypeisn't given, the current order is displayed.typeβ ordering scheme to use. Value options are:noneβ do not order listingsnameβ order listings by namesizeβ order listings by sizetypeβ order listings by type
parallel [number]β set the number of parallel data connections tonumber. This is only useful for extended block mode transfers. The default number of data connections is one. If nonumberis given, the current setting for the number of parallel connects is printed.
more connections = more chaos = more speed, iykyk
passiveβ change to PASSIVE mode, which causes the client to initiate the data connection. This is the default mode unless the variableUBERFTP_ACTIVE_MODEis set in the environment. If you're behind a firewall you must use PASSIVE mode. Non-negotiable, fr fr.pbsz [size]β change the length of the protection buffer. The protection buffer is what encrypts data on the data channel. The length of the protection buffer represents the largest encoded message that is allowed on the data channel. By default, the protection buffer is grown to match the internal buffer used. For efficient transfers,pbszshould be sufficiently larger thanblksizeso that the wrapped buffer fits within the protection buffer. Otherwise, theblksizebuffer is broken into multiple pieces so that each write is less thanpbszwhen wrapped. Ifpbszisn't given, the current size is displayed.sizeβ length of protection buffer.0will set it to its default.
pget offset size srcfile [destfile]β retrieve only the specified portion of the file(s) π Ifsrcfileis a regular expression and expands to multiple files, and a destination is given, that destination must refer to a directory.offsetβ offset within the filesizeβ amount of data to retrievesrcfileβ name of remote filedestfileβ name of local file.srcfileis used ifdestfileis not specified
pput offset size srcfile [destfile]β store only the specified portion of the file(s). Ifsrcfileis a regular expression and expands to multiple files, and a destination is given, that destination must refer to a directory.offsetβ offset within the filesizeβ amount of data to retrievesrcfileβ name of local filedestfileβ name of remote file.srcfileis used ifdestfileis not specified
prot [C|S|E|P]β this command configures the level of security on the data channel after data channel authentication has completed. Clear means the data will not be protected. Safe means the data will be integrity protected, meaning altered data will be detected. Confidential means the data will be unreadable to third parties. Private mode means the data will be confidential and safe. Choose your fighter β¨Cβ set protection level to clear.Sβ set protection level to safe.Eβ set protection level to confidential.Pβ set protection level to private.
put [-r] source [destination]β store file(s) to the remote service. Ifsourceimplies multiple transfers β either through regular expressions or by using the recursive feature β thendestinationmust be a directory. Ifdestinationisn't specified,sourceis used.-rβ recursively transfer the given directory.
pwdβ prints the current working directory. You are here πquitβ close all control and data connections and exit. Goodbye forever, bestie ππquote cmdβ Passcmdto the remote FTP service. This lets you use server-specific commands that are not available through theuberftpinterface. slay, bespoke server magic β¨rename src dstβ Rename the remote objectsrctodst. glow-up but for filenames πretry [cnt]β Configures retry on failed commands that have transient errors.cntis the number of times a failed command is retried. A value of zero effectively disables retry. Zero is the default. If no value is given, the current setting is displayed.cntβ Number of times a failed command is retried.
resume [-d] pathβ Sets a restart point for recursive transfers. If a long recursive transfer fails, you can setresumeto the path that failed and UberFTP will skip all file and directory creations up to the given path. resilience era π«Άpathβ Path to resume transfer at. Ifpathis not given, print the current resume target.-dβ Remove the current resume path.
rm [-r] object1 [object1...objectn]β Removes the remote file system object(s). bye bye, bestie π-rβ Recursively remove the given directory.
rmdir dir1 [dir2...dirn]β Removes the given directories from the remote service.runiqueβ Toggles the client to store files using unique names duringputoperations. no overwrite drama, periodt β¨size file1 [file2...filen]β Prints the size of the given object(s). size check πstage [-r] seconds object1 [object2...objectn]β Attempt to stage all matching files within the given number of seconds on the remote service.secondsβ Number of seconds to attempt staging.-rβ Recursively stage all files in the given subdirectory.
suniqueβ Toggles the client to store files using unique names duringgetoperations. get-mode uniqueness, we love to see it πsymlink [oldfile] [newfile]β Create a symlink tooldfilenamednewfileon the remote service. iconic link behavior πtcpbuf [size]β Set the data channel TCP buffer size tosizebytes. Ifsizeis not given, the current TCP buffer size will be printed. buffering, but make it fashion πversionsβ Prints the versions of all Globus modules being used. receipts, but for modules π§Ύwaitβ Toggles whether the client should wait for files to stage before attempting to retrieve them. patience is a virtue, fr fr π
β¨ IMPROVING FILE TRANSFER PERFORMANCE β¨
Use the active command to enable active mode FTP when using NCSA's UniTree mass storage system if possible since it will give much better file transfer performance. When transferring files over long distances, use a large value (for example, 16777216) for tcpbuf. When there is high network traffic, you may be able to improve performance using the parallel command to increase the number of parallel data connections to 2-4. speed demon era π₯
π¦ THIRD-PARTY TRANSFERS π¦
In order to perform a third-party transfer, you must log into two FTP servers. Typically, you connect to a single FTP service to "get" files to the local machine and "put" files to the remote service. For third-party transfers, you must connect to a second service thereby replacing the former local machine. In UberFTP terminology, it is referred to as "opening a new local service" since, from the perspective of the user, the new local service will appear as though the user initiated the FTP session from that machine. plot twist: the local machine is now someone else π
All remote service commands have "l*" counterparts that allow you to specify that the command is to be performed on the local service, whether that service is the local machine or a new local service. So to open a new local service, use the "l*" version of the open command:
UberFTP> lopen mss.ncsa.teragrid.org
UberFTP> lclose
Once you have connected to both services, files can be transferred as before with the change that files you "get" go to the new local service and files you "put" are sent from the new local service. two servers, one main character π«Ά
π CONTROLLING EPHEMERAL PORT SELECTION π
By default, local port selection is managed by the operating system. However, you may wish to specify which ports UberFTP should use for incoming and outgoing connections. This is useful when dealing with firewalls. firewall drama? we handle it π
Setting UBERFTP_TCP_PORT_RANGE in your environment will cause all inbound connections to use the specified port range. Likewise, setting UBERFTP_TCP_SOURCE_RANGE in your environment will cause all outbound connections to use the specified port range.
The environment variables GLOBUS_TCP_PORT_RANGE and GLOBUS_TCP_SOURCE_RANGE will also control the ephemeral port selection. These variables behave exactly as their UBERFTP counterparts and are available for backwards compatibility with older versions. The UBERFTP variables take precedence over the GLOBUS variables.
The values of the variables specify a port range, a minimum port number and a maximum port number, separated by either a comma or a space. For example, to set the inbound port range, you would set:
UBERFTP_TCP_PORT_RANGE=40000,50000
Using the space delimiter, this format is also acceptable:
UBERFTP_TCP_PORT_RANGE="40000 50000"
See your shell documentation for the proper syntax for settings variables within your environment.
Setting the ephemeral port range to an unusable range will cause UberFTP connections to fail. For instance, setting a port range from 10 to 100 with a non root process will fail on most operating systems. not me picking a cursed port range π
πΈ CAT BEHAVIOUR πΈ
UberFTP 2.9.1 comes with an additional environment variable:
UBERFTP_CAT_CORRECT
If this environment variable is present UberFTP omits the odd newline that is otherwise printed out in addition to the file contents by the cat functionality of previous versions of UberFTP for non-empty files. If it is not present, the old behaviour is used for compatibility reasons. The content of this environment variable is not evaluated, just its presence in your environment. Also see:
https://github.com/gridcf/UberFTP/issues/22
cat behavior lore drop πββ¬β¨
β EXIT VALUES β
UberFTP will exit with a value of 0 if no errors occurred during the session, otherwise it will exit with a value of 1. In non interactive, commandline mode, it will exit after the first error occurs. zero means we ate, one means we did not π
π EXAMPLES π
Set the environment variable to set active mode FTP (improves file transfer performance to the mass storage system). Connect to NCSA's UniTree mass storage system interactively from NCSA's TeraGrid cluster:
setenv UBERFTP_ACTIVE_MODE on
% uberftp mss.ncsa.teragrid.org
...
220 UNIX Archive FTP server ready.
230 User consult logged in.
UberFTP>
Use the command-line interface to copy a file from NCSA's TeraGrid cluster to the UniTree mass storage system. (There is no need to set tcpbuf since it is over a LAN but active mode is turned on to improve file transfer performance to the mass storage system.):
uberftp mss.ncsa.teragrid.org \
"active; cd work; get file.tar"
Copy a file from SDSC's TeraGrid cluster to NCSA's TeraGrid cluster. (Note that tcpbuf is set to 16777216 since there is a long network latency between NCSA and SDSC):
uberftp tg-gridftp.sdsc.teragrid.org \
"tcpbuf 16777216; cd scr; put file.tar"
copy-paste these and serve π
π SEE ALSO π
mssftp(1),msscmd(1),ftp(1)- GridFTP:
- TCP Window Size:
- Active vs. Passive FTP:
Note: The links above are not under the GridCF's control so they may become obsolete. links age like milk, bestie π
okay that's the whole page β UBERFTP(1), dated 22 Jul 2022, and yes she ate. π β¨π
π¦ where this page comes from
- epel 10: uberftp 2.9.1-9.el10_3 Β· NCSA
- epel 9: uberftp 2.9.1-1.el9 Β· NCSA
- fedora 43: uberftp 2.9.1-7.fc43 Β· NCSA
- fedora 44: uberftp 2.9.1-8.fc44 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms