Folder Management
Overview
During a transfer, the user enters only the end of the file path to be transferred. The beginning of this path is calculated by the udmg-server according to the following configurations:
- udmg-server settings, common to all transfers.
- local server, common to all transfers to/from this server (not valid for client transfers).
- transfer rule, common to all transfers using the same rule.
More specific paths have priority over more global paths.
Note
A rule's local, remote, and temporary paths must not be confused with its (virtual) path. The virtual path is only used to identify the rule and not to calculate the actual file paths.
Let's take the example of an incoming transfer where the UDMG Server acts as a server. The file to be transferred is file.txt.
Depending on the values of the various configurations, the destination path of the file changes as follows:
udmg-server root folder | udmg-server “in” folder | Local Server root folder | Local Server receive folder | Transfer Rule local folder | Final file path |
---|---|---|---|---|---|
/root | in | /root/in/file.txt | |||
/root | /in | /in/file.txt | |||
/root | not applicable | server | /root/server/file.txt | ||
/root | not applicable | /server | /server/file.txt | ||
/root | not applicable | /server | serv_in | /server/serv_in/file.txt | |
/root | not applicable | not applicable | /serv_in | /serv_in/file.txt | |
/root | not applicable | /server | not applicable | rule_local | /server/rule_local/file.txt |
/root | not applicable | not applicable | not applicable | /rule_local | /rule_local/file.txt |
Outgoing transfers work in a similar way but replace the UDMG Server's in folder with its out folder; and replace the Local Server's receive folder with its send folder.
udmg-server root folder | udmg-server “out” folder | Local Server root folder | Local Server send folder | Transfer Rule local folder | Final file path |
---|---|---|---|---|---|
/root | out | /root/out/file.txt | |||
/root | /out | /out/file.txt | |||
/root | /out | server | /out/server/file.txt | ||
/root | not applicable | /server | /server/file.txt | ||
/root | not applicable | /server | serv_out | /server/serv_out/file.txt | |
/root | not applicable | not applicable | /serv_out | /serv_out/file.txt | |
/root | not applicable | /server | not applicable | rule_local | /server/rule_local/file.txt |
/root | not applicable | not applicable | not applicable | /rule_local | /rule_local/file.txt |
Client transfers also work in a similar way, but without the server-specific folders.
Inbound client transfer:
udmg-server root folder | udmg-server “in” folder | Transfer Rule local folder | Final file path |
---|---|---|---|
/root | in | /root/in/file.txt | |
/root | /in | /in/file.txt | |
/root | not applicable | rule_local | /root/rule_local/file.txt |
/root | not applicable | /rule_local | /rule_local/file.txt |
Outbound client transfer:
udmg-server root folder | udmg-server “out” folder | Transfer Rule local folder | Final file path |
---|---|---|---|
/root | out | /root/out/file.txt | |
/root | /out | /out/file.txt | |
/root | not applicable | rule_local | /root/rule_local/file.txt |
/root | not applicable | /rule_local | /rule_local/file.txt |
Detailed Explanations
UDMG Server folders
Every instance of UDMG Server has a root folder (called GatewayHome) which the user must enter in the configuration file. By default, if the user has not specified a root, the current folder is used. By default, all non-absolute paths are relative to this root.
It is also in the configuration file that our 3 folders mentioned above are defined, respectively with the options: the "in" folder (DefaultInDir), the "out" folder (DefaultOutDir), and the temporary folder (DefaultTmpDir). During a transfer, if no additional specific paths are specified, then these folders are used locally as the source or destination of the file.
By default, they are assigned the values "in", "out", and "work" respectively. These paths are relative to the root mentioned above. It is also possible to enter an absolute path if the user does not wish one or more of the folders to be located under the root.
Server folders
When creating a local server, you can specify a server root (root attribute), as well as sub-folders for receive, send, and temporary receive (tmpReceive).
The root can be an absolute or relative path. In the latter case, the path is relative to the UDMG Server root. Similarly, sub-folders can be absolute or relative, in which case they are relative to the server root.
Being attached to a local server, these folders are only used for transfers where the UDMG Server acts as a server. If server folders are defined, they override the UDMG Server's global folders when calculating the file path.
Rule folders
When a transfer rule is created, specific folders can be assigned to it. These folders include: a local folder on the UDMG Server, a remote folder on the partner(s), and a temporary local folder (tmpLocal).
All files transferred with this rule use these folders. For send rules, files are always retrieved from the local folder, then dropped into the remote folder. Conversely, in the case of receive rules, files are always retrieved from the remote folder, then dropped into the local temporary folder, before being moved to the receive folder once the transfer is complete.
These folders can be absolute or relative paths. In the latter case, if the UDMG Server is acting as a transfer client, the path is relative to the root. On the other hand, if the UDMG Server is the transfer server, then any relative path is considered to be relative to the local server's root, if it has one, or to the gateway's root if it doesn't have one.
Rule availability and path determination
The effective rules and paths are determined at runtime when a local account or a remote account is accessed.
When a transfer is initiated for a remote partner or when a virtual folder is accessed for a local server, the account is allowed to use a set of Transfer Rules:
- the rules that are authorized for this account,
- the rules that are authorized for the Local Server or the Remote Partner,
- the global rules, that are not assigned to any account, server, or partner.
This is displayed in the Rules tab of the relevant object details pane in the UDMG Admin UI.
For example, this local server has access to the global receiving rule "show_me_the_rules-global_r" and a "private" (or authorized for this server) rule "show_me_the_rules-partner_r".
A test account is assigned to the server:
This account has access to the same rules as the server, but also to a "private" (or authorized for this account) rule "show_me_the_rules-account_r".
Note
Both the rules that are assigned at account level or at server or partner level are indicated with the card icon ( Rules lists.
)in theWhen updating an account, the server or partner level rules are listed in the Selected Items of the Edit Rules pop-up, but only the account level rules can be removed.
Attempting to deassign a server or partner rule will have no effect, it must be done from the relevant server or partner Rules screen.:
Dynamic local paths expansion
Placeholders are allowed in the transfer rule paths (Local Directory and Temp Directory fields) and are expanded at runtime (when the transfer is starting or when an FTP/SFTP command is executed).
This allows to set a common virtual folder name for multiple accounts and servers which will redirected to a private local directory (specific to each login account and/or server).
There is a different list of allowed placeholder per protocol.
- For SFTP and local-auth (Web Transfer) protocols,:
#REQUESTERHOST# : local account name
#REQUESTEDHOST# : local server name - For FTP, FTPS, FTPES:
#REQUESTERHOST# : local account name
For instance, a value of /home/Users/Input/#REQUESTERHOST#
is expanded differently for each account:
/home/Users/Input/sftp_user1
for account "sftp_user1"/home/Users/Input/sftp_user2
for account "sftp_user2".