JANUS FTP: Difference between revisions
mNo edit summary |
mNo edit summary |
||
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:JANUS FTP}} | {{DISPLAYTITLE:JANUS FTP}} | ||
<span class="pageSubtitle" | <span class="pageSubtitle">Configure Janus FTP Server</span> | ||
The <var>JANUS FTP</var> command defines the rules for a <var class="product">[[Janus FTP Server]]</var> running on a <var class="product">[[Janus Sockets]]</var> FTP (<var>[[JANUS DEFINE#type|FTPSERVER]]</var>) port. These rules primarily control access to the files exposed by the FTP server. | The <var>JANUS FTP</var> command defines the rules for a <var class="product">[[Janus FTP Server]]</var> running on a <var class="product">[[Janus Sockets]]</var> FTP (<var>[[JANUS DEFINE#type|FTPSERVER]]</var>) port. These rules primarily control access to the files exposed by the FTP server. | ||
Line 6: | Line 6: | ||
==Syntax== | ==Syntax== | ||
<p class="syntax">< | <p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname rule_type other_parameters</span> </p> | ||
< | |||
The first two parameters are positional and are required: | The first two parameters are positional and are required: | ||
Line 20: | Line 18: | ||
<td>The <var class="term">rule_type</var> specifies the sort of rule being specified for the port(s). Valid values for <var class="term">rule_type</var> are: | <td>The <var class="term">rule_type</var> specifies the sort of rule being specified for the port(s). Valid values for <var class="term">rule_type</var> are: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>ASSIGN</th> | <tr><th><var>ASSIGN</var></th> | ||
<td>Creates FTP folders and maps them to <var class="product">[[Model 204]]</var> files.</td></tr> | <td>Creates FTP folders and maps them to <var class="product">[[Model 204]]</var> files.</td></tr> | ||
<tr><th>DEASSIGN</th> | <tr><th><var>DEASSIGN</var></th> | ||
<td>Removes FTP folders.</td></tr> | <td>Removes FTP folders.</td></tr> | ||
<tr><th>ALLOW</th> | <tr><th><var>ALLOW</var></th> | ||
<td>Grants read or write access to a folder created with <var>JANUS FTP ASSIGN</var>.</td></tr> | <td>Grants read or write access to a folder created with <var>JANUS FTP ASSIGN</var>.</td></tr> | ||
<tr><th>DISALLOW</th> | <tr><th><var>DISALLOW</var></th> | ||
<td>Revokes read or write access to a folder.</td></tr> | <td>Revokes read or write access to a folder.</td></tr> | ||
<tr><th>HOME</th> | <tr><th><var>HOME</var></th> | ||
<td>Specifies a home folder (initial location at login) for a user.</td></tr> | <td>Specifies a home folder (initial location at login) for a user.</td></tr> | ||
<tr><th>ON</th> | |||
<tr><th><var>ON</var></th> | |||
<td>Sets up overrides, by specifying files to be opened and commands to be executed when a specific FTP operation is performed.</td></tr> | <td>Sets up overrides, by specifying files to be opened and commands to be executed when a specific FTP operation is performed.</td></tr> | ||
<tr><th>SUFFIX</th> | |||
<tr><th><var>SUFFIX</var></th> | |||
<td>Allows specification of the transfer mode (text or binary) of procedures/files by suffix (for example, <code>.html</code>, <code>.xml</code>). | <td>Allows specification of the transfer mode (text or binary) of procedures/files by suffix (for example, <code>.html</code>, <code>.xml</code>). | ||
</td></tr></table> | </td></tr></table> | ||
</td></tr> | </td></tr> | ||
<tr><th nowrap | |||
<td>The additional parameters allowed for the <var>JANUS FTP</var> command depend on the rule_type that is specified. The various forms of <var class="term">rule_type</var> and their parameters are described in the following alphabetically ordered sections. | <tr><th nowrap>other_ parameters</th> | ||
</td></tr> | <td>The additional parameters allowed for the <var>JANUS FTP</var> command depend on the rule_type that is specified. The various forms of <var class="term">rule_type</var> and their parameters are described in the following alphabetically ordered sections.</td></tr> | ||
</table> | </table> | ||
Line 45: | Line 45: | ||
In practice, the first of the <var>JANUS FTP</var> commands to issue is <var>ASSIGN</var>. | In practice, the first of the <var>JANUS FTP</var> commands to issue is <var>ASSIGN</var>. | ||
For more examples and more information about <var class="product">Janus FTP Server</var> support, see | For more examples and more information about <var class="product">Janus FTP Server</var> support, see [[Janus FTP Server]]. | ||
== | ==Rule types== | ||
===JANUS FTP ALLOW=== | ===JANUS FTP ALLOW=== | ||
Line 53: | Line 53: | ||
This command is used to grant user access to a folder in addition to any access granted via a <var>DEFAULTPRIVS</var> parameter on the <var>[[#JANUS FTP ASSIGN|JANUS FTP ASSIGN]]</var> for the server port. | This command is used to grant user access to a folder in addition to any access granted via a <var>DEFAULTPRIVS</var> parameter on the <var>[[#JANUS FTP ASSIGN|JANUS FTP ASSIGN]]</var> for the server port. | ||
<p class="syntax"> JANUS FTP portname ALLOW foldername READ | WRITE - | ====Syntax==== | ||
TO [USER user] | [USGROUP usgroup] | ANONYMOUS | ALL | <p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname </span><span class="literal">ALLOW </span><span class="term">foldername </span><span class="literal">READ </span><span class="squareb">|</span> <span class="literal">WRITE - | ||
TO </span><span class="squareb">[</span><span class="literal">USER </span><span class="term">user</span><span class="squareb">] | [</span><span class="literal">USGROUP </span><span class="term">usgroup</span><span class="squareb">] | </span><span class="literal">ANONYMOUS </span><span class="squareb">|</span> <span class="literal">ALL</span> | |||
</p> | </p> | ||
Line 60: | Line 61: | ||
Where: | Where: | ||
<table | <table> | ||
<tr><th | <tr><th>portname</th> | ||
<td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | <td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | ||
<tr><th><i>foldername</i></th> | <tr><th><i>foldername</i></th> | ||
<td>A folder previously created with <var>JANUS FTP ASSIGN</var>.</td></tr> | <td>A folder previously created with <var>JANUS FTP ASSIGN</var>.</td></tr> | ||
<tr><th>READ or WRITE</th> | <tr><th><var>READ</var> or <var>WRITE</var></th> | ||
<td>The folder access privileges being granted. One of these must be specified: | <td>The folder access privileges being granted. One of these must be specified: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>READ</th> | <tr><th><var>READ</var></th> | ||
<td>FTP <code>get</code> (<code>RETR</code> command) and directory listings (<code>LIST</code>) are permitted. Also, the FTP client or user can <code>cd</code> (change directory, <code>CWD</code>) into this directory.</td></tr> | <td>FTP <code>get</code> (<code>RETR</code> command) and directory listings (<code>LIST</code>) are permitted. Also, the FTP client or user can <code>cd</code> (change directory, <code>CWD</code>) into this directory.</td></tr> | ||
<tr><th>WRITE</th> | <tr><th><var>WRITE</var></th> | ||
<td><var>READ</var> privileges plus permission for FTP <code>put</code>, <code>delete</code>, and <code>rename</code> (<code>STOR</code>, <code>DEL</code>, <code>RNFR</code>, and <code>RNTO</code>).</td></tr> | <td><var>READ</var> privileges plus permission for FTP <code>put</code>, <code>delete</code>, and <code>rename</code> (<code>STOR</code>, <code>DEL</code>, <code>RNFR</code>, and <code>RNTO</code>).</td></tr> | ||
</table> | </table> | ||
</td></tr> | </td></tr> | ||
<tr><th>TO</th> | <tr><th><var>TO</var></th> | ||
<td>To whom access is being granted to <var class="term">foldername</var>. One of these options must be specified, and only one of these per folder may be issued. To modify an earlier <var>ALLOW</var> rule, first use <var>FTP DISALLOW</var>. | <td>To whom access is being granted to <var class="term">foldername</var>. One of these options must be specified, and only one of these per folder may be issued. To modify an earlier <var>ALLOW</var> rule, first use <var>FTP DISALLOW</var>. | ||
<table | |||
<tr><th> | <table> | ||
<tr><th><var>USER</var> user</th> | |||
<td>A <var class="product">Model 204</var> user ID. The <var class="term">user</var> is not checked for existence when this command is issued.</td></tr> | <td>A <var class="product">Model 204</var> user ID. The <var class="term">user</var> is not checked for existence when this command is issued.</td></tr> | ||
<tr><th> | |||
<tr><th nowrap><var>USRGROUP</var> usrgroup</th> | |||
<td>A user group created with the <var>[[JANUS DEFINEUSGROUP]]</var>. The group is not checked for existence when this command is issued.</td></tr> | <td>A user group created with the <var>[[JANUS DEFINEUSGROUP]]</var>. The group is not checked for existence when this command is issued.</td></tr> | ||
<tr><th>ANONYMOUS</th> | |||
<td>Anonymous users.</td></tr> | <tr><th><var>ANONYMOUS</var></th> | ||
<tr><th>ALL</th> | <td>[[Janus FTP Server#Anonymous FTP|Anonymous]] users (<var class="product">Model 204</var> user ID not required).</td></tr> | ||
<td>All <var class="product">Model 204</var> users (except the anonymous user). | |||
</td></tr> | <tr><th><var>ALL</var></th> | ||
<td>All <var class="product">Model 204</var> users (except the anonymous user).</td></tr> | |||
</table> | </table> | ||
</td></tr> | </td></tr> | ||
</table> | </table> | ||
Examples of valid FTP ALLOW commands follow: | Examples of valid <var>FTP ALLOW</var> commands follow: | ||
<p class="code"> JANUS FTP FTP01 ALLOW /ANON READ TO ANONYMOUS | <p class="code">JANUS FTP FTP01 ALLOW /ANON READ TO ANONYMOUS | ||
JANUS FTP FTP01 ALLOW /GLWHOME WRITE TO USER GLW | |||
JANUS FTP FTP01 ALLOW /ALL READ TO ALL | |||
JANUS FTP FTP01 ALLOW /GLWHOME READ TO USGROUP FTP | |||
</p> | </p> | ||
For more information about folder access, see [[Janus FTP Server#Folder security| | For more information about folder access, see [[Janus FTP Server#Folder security|Janus FTP Server folder security]]. | ||
===JANUS FTP ASSIGN=== | ===JANUS FTP ASSIGN=== | ||
This command creates an FTP folder for a previously defined FTP port. For more information about folder creation. | This command creates an FTP folder for a previously defined FTP port. For more information about folder creation, see [[Janus FTP Server#Folder mapping|Folder mapping]]. | ||
<p class="syntax"> JANUS FTP portname ASSIGN foldername - | |||
[ TO FILE filename ] - | ====Syntax==== | ||
[ DEFAULTPRIVS READ | WRITE ] - | <p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname </span><span class="literal">ASSIGN </span><span class="term">foldername</span> - | ||
[ PREFIX [. | /] ] | <span class="squareb">[</span> <span class="literal">TO FILE </span><span class="term">filename </span><span class="squareb">]</span> - | ||
<span class="squareb">[</span> <span class="literal">DEFAULTPRIVS READ </span><span class="squareb">|</span> <span class="literal">WRITE</span> <span class="squareb">]</span> - | |||
<span class="squareb">[</span> <span class="literal">PREFIX </span><span class="squareb">[</span><span class="literal">. </span><span class="squareb">|</span><span class="literal"> /</span><span class="squareb">] ]</span> | |||
</p> | </p> | ||
Where: | Where: | ||
<table | <table> | ||
<tr><th>portname</th> | |||
<tr><th | |||
<td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | <td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | ||
<tr><th | <tr><th>foldername</th> | ||
<td>The name of the FTP folder being created. For more information about naming rules, see [[Janus FTP Server#Folder names| | <td>The name of the FTP folder being created. For more information about naming rules, see [[Janus FTP Server#Folder names|Janus FTP folder names]]</td></tr> | ||
<tr><th>TO FILE < | <tr><th nowrap><var>TO FILE</var> filename</th> | ||
<td>The <var class="product">Model 204</var> procedure file being associated with <var class="term">foldername</var>.</td></tr> | <td>The <var class="product">Model 204</var> procedure file being associated with <var class="term">foldername</var>.</td></tr> | ||
<tr><th>DEFAULTPRIVS</th> | |||
<tr><th><var>DEFAULTPRIVS</var></th> | |||
<td>The privileges a user gets unless a <var>JANUS FTP ALLOW</var> rule gives them greater access. If <var>DEFAULTPRIVS</var> is not specified, no access is permitted except that granted by <var>ALLOW</var> rules. Default privileges do <b>not</b> apply to anonymous access. Any anonymous access must be granted with an <var>ALLOW</var> rule. The privileges allowed are <var>READ</var> and <var>WRITE</var>, one of which must be specified, as discussed in <var>[[#JANUS FTP ALLOW|ALLOW]]</var>.</td></tr> | <td>The privileges a user gets unless a <var>JANUS FTP ALLOW</var> rule gives them greater access. If <var>DEFAULTPRIVS</var> is not specified, no access is permitted except that granted by <var>ALLOW</var> rules. Default privileges do <b>not</b> apply to anonymous access. Any anonymous access must be granted with an <var>ALLOW</var> rule. The privileges allowed are <var>READ</var> and <var>WRITE</var>, one of which must be specified, as discussed in <var>[[#JANUS FTP ALLOW|ALLOW]]</var>.</td></tr> | ||
<tr><th>PREFIX</th> | <tr><th><var>PREFIX</var></th> | ||
<td>Invokes prefixing for this folder, as described in | <td>Invokes prefixing for this folder, as described in [[Janus FTP Server#Prefixing|Janus FTP Server prefixing]]. Files uploaded to this folder by FTP clients are stored with the name of the folder prefixed to the <var class="term">filename</var>. File <code>MYFILE</code> uploaded to folder <code>ANNUAL</code> becomes procedure <code>/ANNUAL/MYFILE</code>. <var>PREFIX</var> may be be followed by a "prefix character" — forward slash ( <tt>/</tt> ) or period (<tt>.</tt>) — which is used as the separator in folder names. The default is a forward slash. | ||
<p class="note"><b>Note:</b> The characters in the prefix string <b>are</b> added to and <b>do</b> increase the length of the procedure name, whose <var class="product">Model 204</var> limit is 255.</p> | |||
</td></tr> | </td></tr> | ||
</table> | </table> | ||
Line 142: | Line 148: | ||
If you use a single <var>JANUS FTP ASSIGN</var> to create a folder such as <code>/A/B/C</code>, the following FTP change directory command works as expected: | If you use a single <var>JANUS FTP ASSIGN</var> to create a folder such as <code>/A/B/C</code>, the following FTP change directory command works as expected: | ||
<p class="code"> cd /A/B/C | <p class="code">cd /A/B/C | ||
</p> | </p> | ||
However, you cannot use <code>cd</code> to move to the intermediate folder levels <code>/A</code> and <code>/A/B</code>, unless each of these levels is also defined with an individual <var>JANUS FTP ASSIGN</var> command. In addition to defining <code>/A</code>, <code>/A/B</code>, and <code>/A/B/C</code> as three separate folders with three <var>ASSIGN</var> commands, allowing navigation to all three levels also requires granting at least <var>READ</var> access at each level. The following statements create this three-level folder structure: | However, you cannot use <code>cd</code> to move to the intermediate folder levels <code>/A</code> and <code>/A/B</code>, unless each of these levels is also defined with an individual <var>JANUS FTP ASSIGN</var> command. In addition to defining <code>/A</code>, <code>/A/B</code>, and <code>/A/B/C</code> as three separate folders with three <var>ASSIGN</var> commands, allowing navigation to all three levels also requires granting at least <var>READ</var> access at each level. The following statements create this three-level folder structure: | ||
<p class="code"> JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC DEFAULTPRIVS READ | <p class="code">JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC DEFAULTPRIVS READ | ||
JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC DEFAULTPRIVS READ | |||
JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC DEFAULTPRIVS READ | |||
</p> | </p> | ||
The statements above create three folders that point to the same underlying procedure file. FTP clients will display and be able to navigate up and down this directory tree. In this case, however, clients will see the same procedures at any folder level they view. You can adjust this outcome by adding prefixing to the assignments: | The statements above create three folders that point to the same underlying procedure file. FTP clients will display and be able to navigate up and down this directory tree. In this case, however, clients will see the same procedures at any folder level they view. You can adjust this outcome by adding prefixing to the assignments: | ||
<p class="code"> JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC DEFAULTPRIVS READ PREFIX | <p class="code">JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC DEFAULTPRIVS READ PREFIX | ||
JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC DEFAULTPRIVS READ PREFIX | |||
JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC DEFAULTPRIVS READ PREFIX | |||
</p> | </p> | ||
Line 163: | Line 169: | ||
<ul> | <ul> | ||
<li>The names of all files uploaded to these FTP server folders are prefixed with the name of the folder to which they are uploaded. The <code>INFO</code> file uploaded to folder <code>/A/B/C</code> is stored as <code>/A/B/C/INFO</code>.</li> | <li>The names of all files uploaded to these FTP server folders are prefixed with the name of the folder to which they are uploaded. The <code>INFO</code> file uploaded to folder <code>/A/B/C</code> is stored as <code>/A/B/C/INFO</code>.</li> | ||
<li>To clients, a display of the list of the files in any folder contains only the files that are prefixed with that folder name. | <li>To clients, a display of the list of the files in any folder contains only the files that are prefixed with that folder name. | ||
< | |||
<b>Note:</b> Such a display may also include files that belong to a subfolder: for example, the <code>/A/B/C/INFO</code> file will be displayed in a list of the files in folder <code>/A</code> as <code>/A/B/C/INFO</code>, in a list of the files in folder <code>B/</code> as <code>/B/C/INFO</code>, and in a list of the files in folder <code>C/</code> as <code>/C/INFO</code>.</li> | <p class="note"><b>Note:</b> Such a display may also include files that belong to a subfolder: for example, the <code>/A/B/C/INFO</code> file will be displayed in a list of the files in folder <code>/A</code> as <code>/A/B/C/INFO</code>, in a list of the files in folder <code>B/</code> as <code>/B/C/INFO</code>, and in a list of the files in folder <code>C/</code> as <code>/C/INFO</code>.</p></li> | ||
</ul> | </ul> | ||
An alternative to prefixing in this case is to assign each folder to its own procedure file, as shown below. Then a display to a client of the list of the files in any folder contains all the files that are stored in that procedure file, without regard for prefixes, if any, or for how the files got there: | An alternative to prefixing in this case is to assign each folder to its own procedure file, as shown below. Then a display to a client of the list of the files in any folder contains all the files that are stored in that procedure file, without regard for prefixes, if any, or for how the files got there: | ||
<p class="code"> JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC1 DEFAULTPRIVS READ | <p class="code">JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC1 DEFAULTPRIVS READ | ||
JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC2 DEFAULTPRIVS READ | |||
JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC3 DEFAULTPRIVS READ | |||
</p> | </p> | ||
Of course, in all the examples above, you can use <var>FTP ALLOW</var> commands (along with or in place of the <var>DEFAULTPRIVS</var> parameter of <var>FTP ASSIGN</var>) to diversify user access. For example: | Of course, in all the examples above, you can use <var>FTP ALLOW</var> commands (along with or in place of the <var>DEFAULTPRIVS</var> parameter of <var>FTP ASSIGN</var>) to diversify user access. For example: | ||
<p class="code"> JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC1 DEFAULTPRIVS WRITE | <p class="code">JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC1 DEFAULTPRIVS WRITE | ||
JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC2 DEFAULTPRIVS READ | |||
JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC3 DEFAULTPRIVS READ | |||
JANUS FTP FTPJ1 ALLOW /A/B WRITE TO USGROUP DEV | |||
JANUS FTP FTPJ1 ALLOW /A/B/C WRITE TO USER SUPER | |||
</p> | </p> | ||
Line 187: | Line 194: | ||
===JANUS FTP DEASSIGN=== | ===JANUS FTP DEASSIGN=== | ||
This command removes an existing FTP folder from a Janus FTP port. | This command removes an existing FTP folder from a Janus FTP port. | ||
<p class="syntax"> JANUS FTP portname DEASSIGN foldername | ====Syntax==== | ||
<p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname </span><span class="literal">DEASSIGN </span><span class="term">foldername</span> | |||
</p> | </p> | ||
Where: | Where: | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th | <tr><th>portname</th> | ||
<td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | <td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | ||
<tr><th | |||
<tr><th>foldername</th> | |||
<td>A folder previously created with <var>JANUS FTP ASSIGN</var>. | <td>A folder previously created with <var>JANUS FTP ASSIGN</var>. | ||
</td></tr> | </td></tr> | ||
Line 209: | Line 216: | ||
Example <var>DEASSIGN</var> commands follow: | Example <var>DEASSIGN</var> commands follow: | ||
<p class="code"> JANUS FTP FTP04 DEASSIGN /TEMPAREA | <p class="code">JANUS FTP FTP04 DEASSIGN /TEMPAREA | ||
JANUS FTP FTPANON DEASSIGN /JUNK | |||
</p> | </p> | ||
===JANUS FTP DISALLOW=== | ===JANUS FTP DISALLOW=== | ||
This command revokes folder access rights that were previously granted using JANUS FTP ALLOW. | |||
====Syntax==== | |||
<p class="syntax"> JANUS FTP portname DISALLOW foldername - | <p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname </span><span class="literal">DISALLOW </span><span class="term">foldername</span> - | ||
TO [USER user] | [USGROUP usgroup] | ANONYMOUS | ALL | <span class="literal">TO </span><span class="squareb">[</span><span class="literal">USER </span><span class="term">user</span><span class="squareb">] | [</span><span class="literal">USGROUP </span><span class="term">usgroup</span><span class="squareb">] | </span><span class="literal">ANONYMOUS </span><span class="squareb">|</span> <span class="literal">ALL</span> | ||
</p> | </p> | ||
Where: | Where: | ||
<table | <table> | ||
<tr><th | <tr><th>portname</th> | ||
<td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | <td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | ||
<tr><th | <tr><th>foldername</th> | ||
<td>A folder previously created with <var>JANUS FTP ASSIGN</var>.</td></tr> | <td>A folder previously created with <var>JANUS FTP ASSIGN</var>.</td></tr> | ||
<tr><th>TO</th> | <tr><th><var>TO</var></th> | ||
<td>Specifies whose access to <var class="term">foldername</var> is to be taken away. Users <b>not</b> previously specified by <var>JANUS FTP ALLOW</var> are ignored. One of these options must be specified: | <td>Specifies whose access to <var class="term">foldername</var> is to be taken away. Users <b>not</b> previously specified by <var>JANUS FTP ALLOW</var> are ignored. One of these options must be specified: | ||
<table | <table> | ||
<tr><th><var>USER</var | <tr><th><var>USER</var> user</th> | ||
<td>A <var class="product">Model 204</var> user ID. The user is not checked for existence when this command is issued.</td></tr> | <td>A <var class="product">Model 204</var> user ID. The user is not checked for existence when this command is issued.</td></tr> | ||
<tr><th><var>USRGROUP</var | |||
<tr><th nowrap><var>USRGROUP</var> usrgroup</th> | |||
<td>A user group created with the <var>[[JANUS DEFINEUSGROUP]]</var> command. The group is not checked for existence when this command is issued.</td></tr> | <td>A user group created with the <var>[[JANUS DEFINEUSGROUP]]</var> command. The group is not checked for existence when this command is issued.</td></tr> | ||
<tr><th><var>ANONYMOUS</var></th> | <tr><th><var>ANONYMOUS</var></th> | ||
<td>[[Janus FTP Server#Anonymous FTP|Anonymous]] users.</td></tr> | <td>[[Janus FTP Server#Anonymous FTP|Anonymous]] users.</td></tr> | ||
<tr><th><var>ALL</var></th> | <tr><th><var>ALL</var></th> | ||
<td>All <var class="product">Model 204</var> users (except an anonymous user). | <td>All <var class="product">Model 204</var> users (except an anonymous user). | ||
Line 247: | Line 257: | ||
An example <var>DISALLOW</var> command follows: | An example <var>DISALLOW</var> command follows: | ||
<p class="code"> JANUS FTP FTP01 DISALLOW /PUB0 TO USER XXXX | <p class="code">JANUS FTP FTP01 DISALLOW /PUB0 TO USER XXXX | ||
</p> | </p> | ||
===JANUS FTP HOME=== | ===JANUS FTP HOME=== | ||
This command identifies the folder where an FTP user is placed when they log in. | This command identifies the folder where an FTP user is placed when they log in. | ||
<p class="syntax"> JANUS FTP portname HOME foldername - | ====Syntax==== | ||
TO [USER user] | [USGROUP usgroup] | ANONYMOUS | ALL | <p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname </span><span class="literal">HOME </span><span class="term">foldername</span> - | ||
<span class="literal">TO </span><span class="squareb">[</span><span class="literal">USER </span><span class="term">user</span><span class="squareb">] | [</span><span class="literal">USGROUP </span><span class="term">usgroup</span><span class="squareb">] | </span><span class="literal">ANONYMOUS </span><span class="squareb">| </span><span class="literal">ALL</span> | |||
</p> | </p> | ||
Where: | Where: | ||
<table | <table> | ||
<tr><th | <tr><th>portname</th> | ||
<td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | <td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | ||
<tr><th | |||
<tr><th>foldername</th> | |||
<td>A folder previously created with <var>JANUS FTP ASSIGN</var>.</td></tr> | <td>A folder previously created with <var>JANUS FTP ASSIGN</var>.</td></tr> | ||
<tr><th><var>TO</var></th> | <tr><th><var>TO</var></th> | ||
<td>The <var>TO</var> clause identifies for whom a home folder is to be set up. One of these options must be specified: | <td>The <var>TO</var> clause identifies for whom a home folder is to be set up. One of these options must be specified: | ||
<table | <table> | ||
<tr><th><var>USER</var | <tr><th><var>USER</var> user</th> | ||
<td>A <var class="product">Model 204</var> user ID. The <var class="term">user</var> is not checked for existence when this command is issued.</td></tr> | <td>A <var class="product">Model 204</var> user ID. The <var class="term">user</var> is not checked for existence when this command is issued.</td></tr> | ||
<tr><th><var>USRGROUP</var | |||
<td>A user group created with the JANUS DEFUSG | <tr><th nowrap><var>USRGROUP</var> usrgroup</th> | ||
<td>A user group created with the <var>[[JANUS DEFINEUSGROUP|JANUS DEFUSG]]</var> command. The group is not checked for existence when this command is issued.</td></tr> | |||
<tr><th><var>ANONYMOUS</var></th> | <tr><th><var>ANONYMOUS</var></th> | ||
<td>[[Janus FTP Server#Anonymous FTP|Anonymous]] users.</td></tr> | <td>[[Janus FTP Server#Anonymous FTP|Anonymous]] users (<var class="product">Model 204</var> user ID not required).</td></tr> | ||
<tr><th>ALL</th> | <tr><th>ALL</th> | ||
<td>All <var class="product">Model 204</var> users (except the anonymous user). | <td>All <var class="product">Model 204</var> users (except the anonymous user).</td></tr> | ||
</td></tr> | |||
</table> | </table> | ||
</td></tr> | </td></tr> | ||
</table> | </table> | ||
<b>Note:</b> All <var>Janus FTP Server</var> users must have a home folder assigned. | <blockquote class="note:> | ||
<p><b>Note:</b> All <var>Janus FTP Server</var> users must have a home folder assigned. </p> | |||
When a user logs in, the <var>JANUS FTP HOME</var> commands for the port are used as a rule set to select a home folder. The following steps are then applied to the home rule set to determine a home folder: | <p> | ||
When a user logs in, the <var>JANUS FTP HOME</var> commands for the port are used as a rule set to select a home folder. The following steps are then applied to the home rule set to determine a home folder: </p> | |||
<ol> | <ol> | ||
<li>If the user is anonymous and there is an anonymous entry, use it; but if there is no anonymous entry, reject the login.</li> | <li>If the user is anonymous and there is an anonymous entry, use it; but if there is no anonymous entry, reject the login.</li> | ||
<li>If the user is <b>not</b> anonymous, do the following:</li> | <li>If the user is <b>not</b> anonymous, do the following:</li> | ||
<ol> | <ol> | ||
<li>If an <var>HOME</var> rule specifies the <var class="term">user</var> on a <var>USER</var> clause, use that folder. </li> | <li>If an <var>HOME</var> rule specifies the <var class="term">user</var> on a <var>USER</var> clause, use that folder. </li> | ||
<li>If no <var>USER</var> clause matches, but the <var class="term">user</var> is in a group specified in an <var>HOME</var> rule USGROUP, use that folder.</li> | <li>If no <var>USER</var> clause matches, but the <var class="term">user</var> is in a group specified in an <var>HOME</var> rule USGROUP, use that folder.</li> | ||
<li>If no USGROUP group contains the user, but an <var>ALL</var> rule is present, use that folder. </li> | <li>If no USGROUP group contains the user, but an <var>ALL</var> rule is present, use that folder. </li> | ||
<li>If no <var>HOME</var> rule matches, the login is rejected.</li> | <li>If no <var>HOME</var> rule matches, the login is rejected.</li> | ||
</ol> | </ol> | ||
</li> | |||
</ol> | </ol> | ||
</blockquote> | |||
Example <var>JANUS FTP HOME</var> commands follow: | Example <var>JANUS FTP HOME</var> commands follow: | ||
<p class="code"> JANUS FTP FTP01 HOME /GLW2HOME TO USER GLW2 | <p class="code">JANUS FTP FTP01 HOME /GLW2HOME TO USER GLW2 | ||
JANUS FTP FTP01 HOME /ALL TO ALL | |||
JANUS FTP FTP01 HOME /GLWHOME TO USGROUP FTP | |||
</p> | </p> | ||
===JANUS FTP ON=== | ===JANUS FTP ON=== | ||
This command lets you override the default processing of an FTP operation (service command) with your own version. | This command lets you override the default processing of an FTP operation (service command) with your own version. | ||
<p class="syntax"> JANUS FTP portname ON foldername | * - | ====Syntax==== | ||
STOR | RETR | LIST | RNTO | DELE - | <p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname </span><span class="literal">ON </span><span class="term">foldername </span><span class="squareb">|</span> <span class="literal">*</span> - | ||
[OPEN fg [[AND fg] ...]] CMD cmd [[AND cmd] ...] | DEFAULT | <span class="literal">STOR </span><span class="squareb">|</span> <span class="literal">RETR </span><span class="squareb">| </span><span class="literal">LIST </span><span class="squareb">|</span> <span class="literal">RNTO </span><span class="squareb">|</span> <span class="literal">DELE</span> - | ||
<span class="squareb">[</span><span class="literal">OPEN </span><span class="term">fg </span><span class="squareb">[[</span><span class="literal">AND </span><span class="term">fg</span><span class="squareb">] ...]] </span><span class="literal">CMD </span><span class="term">cmd </span><span class="squareb">[[</span><span class="literal">AND </span><span class="term">cmd</span><span class="squareb">] ...] | </span><span class="literal">DEFAULT</span> | |||
</p> | </p> | ||
Where: | Where: | ||
<table | <table> | ||
<tr><th | <tr><th>portname</th> | ||
<td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | <td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | ||
<tr><th | |||
<tr><th>foldername</th> | |||
<td>A folder previously created with <var>JANUS FTP ASSIGN</var>. If an asterisk (<code>*</code>) is specified instead of a folder name, the override is used for all folders on the port.</td></tr> | <td>A folder previously created with <var>JANUS FTP ASSIGN</var>. If an asterisk (<code>*</code>) is specified instead of a folder name, the override is used for all folders on the port.</td></tr> | ||
<tr><th>STOR | RETR | LIST | RNTO | DELE</th> | |||
<td>Names the operation being overriden (one of the following must be selected). For a list of all the FTP commands supported by <var class="product">Janus FTP Server</var>, including those not available for override, see | <tr><th><var>STOR</var> | <var>RETR</var> | <var>LIST</var> | <var>RNTO</var> | <var>DELE</var></th> | ||
< | <td>Names the operation being overriden (one of the following must be selected). For a list of all the FTP commands supported by <var class="product">Janus FTP Server</var>, including those not available for override, see [[Janus FTP Server#Janus FTP Server command reference|Janus FTP Server command reference]]. | ||
<table> | |||
< | <tr class="head"><th>This option</th> | ||
<tr><th>STOR</th><td>FTP <code>put</code> (upload files)</td></tr> | <th>Overrides this operation</th></tr> | ||
<tr><th> | |||
<tr><th>LIST</th><td>FTP <code>ls</code> or <code>dir</code> (list files in wide or narrow format)</td></tr> | <tr><th><var>STOR</var></th><td>FTP <code>put</code> (upload files)</td></tr> | ||
<tr><th>RNTO</th><td>FTP <code>rename</code></td></tr> | |||
<tr><th>DELE</th><td>FTP <code>delete</code></td></tr> | <tr><th><var>RETR</var></th><td>FTP <code>get</code> (download files)</td></tr> | ||
<tr><th><var>LIST</var></th><td>FTP <code>ls</code> or <code>dir</code> (list files in wide or narrow format)</td></tr> | |||
<tr><th><var>RNTO</var></th><td>FTP <code>rename</code></td></tr> | |||
<tr><th><var>DELE</var></th><td>FTP <code>delete</code></td></tr> | |||
</table> | </table> | ||
</td></tr> | </td></tr> | ||
<tr><th> | <tr><th><var>OPEN</var> fg</th> | ||
<td>Lists one or more files or groups to open before the commands specified on the CMD clause are run. If you specify multiple files or groups, they must be separated by <var>AND</var> keywords. Each <var class="term">fg</var> term has the following format, where you can specify individual open privileges (which default to < | <td>Lists one or more files or groups to open before the commands specified on the CMD clause are run. If you specify multiple files or groups, they must be separated by <var>AND</var> keywords. Each <var class="term">fg</var> term has the following format, where you can specify individual open privileges (which default to <code>X'0221'</code>): | ||
<p class="syntax">[FILE | GROUP] < | |||
<p class="syntax"><span class="squareb">[</span><span class="literal">FILE </span><span class="squareb">| </span><span class="literal">GROUP</span><span class="squareb">]</span> <span class="term">fgname</span> <span class="squareb">[[</span><span class="literal">WITH</span><span class="squareb">]</span> <span class="term">privs</span><span class="squareb">]</span> | |||
</p> | </p> | ||
</td></tr> | </td></tr> | ||
<tr><th> | |||
<tr><th><var>CMD</var> cmd</th> | |||
<td>Lists one or more <var class="product">Model 204</var> commands to execute to perform the override. If more than one is specified, they must be separated by <var>AND</var> keywords. Any command that contains blanks must be enclosed in quotes. The total length of commands plus one overhead byte per command may not exceed 255 bytes.</td></tr> | <td>Lists one or more <var class="product">Model 204</var> commands to execute to perform the override. If more than one is specified, they must be separated by <var>AND</var> keywords. Any command that contains blanks must be enclosed in quotes. The total length of commands plus one overhead byte per command may not exceed 255 bytes.</td></tr> | ||
<tr><th>DEFAULT</th> | |||
<tr><th><var>DEFAULT</var></th> | |||
<td>Resets any previous <var>FTP ON</var> for the folder, restoring the default handling of the operation specified in that <var>ON</var> rule. In short, to reverse an <var>ON</var>, use <var>DEFAULT</var>. | <td>Resets any previous <var>FTP ON</var> for the folder, restoring the default handling of the operation specified in that <var>ON</var> rule. In short, to reverse an <var>ON</var>, use <var>DEFAULT</var>. | ||
<b>Note:</b> For a given operation and folder, any previous <var>ON</var> rule must be be turned off with <var>DEFAULT</var> before a new <var>FTP ON</var> is issued. | <p class="note"><b>Note:</b> For a given operation and folder, any previous <var>ON</var> rule must be be turned off with <var>DEFAULT</var> before a new <var>FTP ON</var> is issued. </p> | ||
</td></tr> | </td></tr> | ||
</table> | </table> | ||
Line 352: | Line 380: | ||
Example FTP ON commands follow: | Example FTP ON commands follow: | ||
<p class="code"> JANUS FTP FTP05 ON /SPLAT STOR - | <p class="code">JANUS FTP FTP05 ON /SPLAT STOR - | ||
OPEN FTPTEST WITH X'BFFF' CMD 'I POV.STOR' | |||
JANUS FTP FTP05 ON /SPLAT LIST - | |||
OPEN FILE FTPTEST CMD 'I POV.LIST' | |||
JANUS FTP FTP05 ON * LIST CMD 'SUB1' | |||
</p> | </p> | ||
===JANUS FTP SUFFIX=== | ===JANUS FTP SUFFIX=== | ||
This command lets you specify any file types that a <var class="product">Janus FTP Server</var> should treat as text data for storage and translation purposes (even if received under BINARY transfer mode). This permits Janus FTP to work with those FTP clients that incorrectly send all files in BINARY mode, even those that are text data. | This command lets you specify any file types that a <var class="product">Janus FTP Server</var> should treat as text data for storage and translation purposes (even if received under BINARY transfer mode). This permits Janus FTP to work with those FTP clients that incorrectly send all files in BINARY mode, even those that are text data. | ||
<p class="syntax"> | ====Syntax==== | ||
<p class="syntax"><span class="literal">JANUS FTP </span><span class="term">portname </span><span class="literal">SUFFIX </span><span class="term">suffix </span><span class="squareb">[</span><span class="literal">TEXT </span><span class="squareb">| </span><span class="literal">DEFAULT</span><span class="squareb">]</span> | |||
</p> | </p> | ||
Where: | Where: | ||
<table | <table> | ||
<tr><th | <tr><th>portname</th> | ||
<td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | <td>Must be a previously defined <var class="product">Janus FTP Server</var> port.</td></tr> | ||
<tr><th | |||
<tr><th>suffix</th> | |||
<td>A file-type suffix that ends a procedure name (preceded by a period in the procedure name). For example, you use <code>HTML</code> to match procedures whose names are of form <code>WHATEVER.HTML</code>.</td></tr> | <td>A file-type suffix that ends a procedure name (preceded by a period in the procedure name). For example, you use <code>HTML</code> to match procedures whose names are of form <code>WHATEVER.HTML</code>.</td></tr> | ||
<tr><th>TEXT</th> | |||
<tr><th><var>TEXT</var></th> | |||
<td>Procedures with names ending in <var class="term">suffix</var> will be handled as text data (not binary), even if the FTP transfer mode is BINARY.</td></tr> | <td>Procedures with names ending in <var class="term">suffix</var> will be handled as text data (not binary), even if the FTP transfer mode is BINARY.</td></tr> | ||
<tr><th>DEFAULT</th> | |||
<tr><th><var>DEFAULT</var></th> | |||
<td>Restores the default behaviour (no special handling); can be used to turn off a previously issued <var>FTP SUFFIX</var> command. | <td>Restores the default behaviour (no special handling); can be used to turn off a previously issued <var>FTP SUFFIX</var> command. | ||
</td></tr></table> | </td></tr></table> | ||
Line 390: | Line 420: | ||
Example <var>FTP SUFFIX</var> commands follow: | Example <var>FTP SUFFIX</var> commands follow: | ||
<p class="code"> JANUS FTP FTP01 SUFFIX HTML TEXT | <p class="code">JANUS FTP FTP01 SUFFIX HTML TEXT | ||
JANUS FTP FTP01 SUFFIX XML TEXT | |||
JANUS FTP FTP01 SUFFIX FOO DEFAULT | |||
</p> | </p> | ||
Latest revision as of 19:29, 1 August 2014
Configure Janus FTP Server
The JANUS FTP command defines the rules for a Janus FTP Server running on a Janus Sockets FTP (FTPSERVER) port. These rules primarily control access to the files exposed by the FTP server.
Syntax
JANUS FTP portname rule_type other_parameters
The first two parameters are positional and are required:
portname | The name (thirty characters or fewer) of the FTP port, or a pattern specifying a set of ports, for which the rule is being defined. Wildcards are allowed. The Janus definition of the port or ports must include the FTPSERVER parameter. | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rule_type | The rule_type specifies the sort of rule being specified for the port(s). Valid values for rule_type are:
| ||||||||||||||
other_ parameters | The additional parameters allowed for the JANUS FTP command depend on the rule_type that is specified. The various forms of rule_type and their parameters are described in the following alphabetically ordered sections. |
You must specify at least three JANUS FTP commands — one each of JANUS FTP ASSIGN, JANUS FTP ALLOW, and JANUS FTP HOME — and it typically takes a set of JANUS FTP commands to fully specify the rules for an FTP server port. For instance, it may take a number of commands to specify the folders that are available for access, the users that may connect, and the privileges and home folders of the users.
In practice, the first of the JANUS FTP commands to issue is ASSIGN.
For more examples and more information about Janus FTP Server support, see Janus FTP Server.
Rule types
JANUS FTP ALLOW
This command is used to grant user access to a folder in addition to any access granted via a DEFAULTPRIVS parameter on the JANUS FTP ASSIGN for the server port.
Syntax
JANUS FTP portname ALLOW foldername READ | WRITE - TO [USER user] | [USGROUP usgroup] | ANONYMOUS | ALL
Where:
portname | Must be a previously defined Janus FTP Server port. | ||||||||
---|---|---|---|---|---|---|---|---|---|
foldername | A folder previously created with JANUS FTP ASSIGN. | ||||||||
READ or WRITE | The folder access privileges being granted. One of these must be specified:
| ||||||||
TO | To whom access is being granted to foldername. One of these options must be specified, and only one of these per folder may be issued. To modify an earlier ALLOW rule, first use FTP DISALLOW.
|
Examples of valid FTP ALLOW commands follow:
JANUS FTP FTP01 ALLOW /ANON READ TO ANONYMOUS JANUS FTP FTP01 ALLOW /GLWHOME WRITE TO USER GLW JANUS FTP FTP01 ALLOW /ALL READ TO ALL JANUS FTP FTP01 ALLOW /GLWHOME READ TO USGROUP FTP
For more information about folder access, see Janus FTP Server folder security.
JANUS FTP ASSIGN
This command creates an FTP folder for a previously defined FTP port. For more information about folder creation, see Folder mapping.
Syntax
JANUS FTP portname ASSIGN foldername - [ TO FILE filename ] - [ DEFAULTPRIVS READ | WRITE ] - [ PREFIX [. | /] ]
Where:
portname | Must be a previously defined Janus FTP Server port. |
---|---|
foldername | The name of the FTP folder being created. For more information about naming rules, see Janus FTP folder names |
TO FILE filename | The Model 204 procedure file being associated with foldername. |
DEFAULTPRIVS | The privileges a user gets unless a JANUS FTP ALLOW rule gives them greater access. If DEFAULTPRIVS is not specified, no access is permitted except that granted by ALLOW rules. Default privileges do not apply to anonymous access. Any anonymous access must be granted with an ALLOW rule. The privileges allowed are READ and WRITE, one of which must be specified, as discussed in ALLOW. |
PREFIX | Invokes prefixing for this folder, as described in Janus FTP Server prefixing. Files uploaded to this folder by FTP clients are stored with the name of the folder prefixed to the filename. File MYFILE uploaded to folder ANNUAL becomes procedure /ANNUAL/MYFILE . PREFIX may be be followed by a "prefix character" — forward slash ( / ) or period (.) — which is used as the separator in folder names. The default is a forward slash.
Note: The characters in the prefix string are added to and do increase the length of the procedure name, whose Model 204 limit is 255. |
You can dynamically assign folders once a port is started, but you may not issue multiple JANUS FTP ASSIGN commands for the same folder. To reassign a folder, you must first remove the assignment using JANUS FTP DEASSIGN. You may not deassign a folder once a port is started, however; in this case, you must first drain the folder using the JANUS DRAIN command.
If you use a single JANUS FTP ASSIGN to create a folder such as /A/B/C
, the following FTP change directory command works as expected:
cd /A/B/C
However, you cannot use cd
to move to the intermediate folder levels /A
and /A/B
, unless each of these levels is also defined with an individual JANUS FTP ASSIGN command. In addition to defining /A
, /A/B
, and /A/B/C
as three separate folders with three ASSIGN commands, allowing navigation to all three levels also requires granting at least READ access at each level. The following statements create this three-level folder structure:
JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC DEFAULTPRIVS READ JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC DEFAULTPRIVS READ JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC DEFAULTPRIVS READ
The statements above create three folders that point to the same underlying procedure file. FTP clients will display and be able to navigate up and down this directory tree. In this case, however, clients will see the same procedures at any folder level they view. You can adjust this outcome by adding prefixing to the assignments:
JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC DEFAULTPRIVS READ PREFIX JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC DEFAULTPRIVS READ PREFIX JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC DEFAULTPRIVS READ PREFIX
As a result:
- The names of all files uploaded to these FTP server folders are prefixed with the name of the folder to which they are uploaded. The
INFO
file uploaded to folder/A/B/C
is stored as/A/B/C/INFO
. - To clients, a display of the list of the files in any folder contains only the files that are prefixed with that folder name.
Note: Such a display may also include files that belong to a subfolder: for example, the
/A/B/C/INFO
file will be displayed in a list of the files in folder/A
as/A/B/C/INFO
, in a list of the files in folderB/
as/B/C/INFO
, and in a list of the files in folderC/
as/C/INFO
.
An alternative to prefixing in this case is to assign each folder to its own procedure file, as shown below. Then a display to a client of the list of the files in any folder contains all the files that are stored in that procedure file, without regard for prefixes, if any, or for how the files got there:
JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC1 DEFAULTPRIVS READ JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC2 DEFAULTPRIVS READ JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC3 DEFAULTPRIVS READ
Of course, in all the examples above, you can use FTP ALLOW commands (along with or in place of the DEFAULTPRIVS parameter of FTP ASSIGN) to diversify user access. For example:
JANUS FTP FTPJ1 ASSIGN /A TO FILE JPROC1 DEFAULTPRIVS WRITE JANUS FTP FTPJ1 ASSIGN /A/B TO FILE JPROC2 DEFAULTPRIVS READ JANUS FTP FTPJ1 ASSIGN /A/B/C TO FILE JPROC3 DEFAULTPRIVS READ JANUS FTP FTPJ1 ALLOW /A/B WRITE TO USGROUP DEV JANUS FTP FTPJ1 ALLOW /A/B/C WRITE TO USER SUPER
A benefit of predefining a folder tree like /A
, /A/B
, and /A/B/C
is that, by making the folder names match the names of the directories on your workstation, you can then upload entire directories and subdirectories in one request, if your FTP client permits. Janus FTP Server does not currently support client requests to create (or delete or rename) a folder, so the required directry/subdirectory structure must preexist on the server before a client can upload files arranged in such a structure.
JANUS FTP DEASSIGN
This command removes an existing FTP folder from a Janus FTP port.
Syntax
JANUS FTP portname DEASSIGN foldername
Where:
portname | Must be a previously defined Janus FTP Server port. |
---|---|
foldername | A folder previously created with JANUS FTP ASSIGN. |
Once an FTP Server port is started, no JANUS FTP DEASSIGN commands may be issued for it; the port must first be drained (using JANUS DRAIN).
A folder may not be removed with DEASSIGN if it is referred to by JANUS FTP ALLOW, JANUS FTP HOME, or JANUS FTP ON rules.
Example DEASSIGN commands follow:
JANUS FTP FTP04 DEASSIGN /TEMPAREA JANUS FTP FTPANON DEASSIGN /JUNK
JANUS FTP DISALLOW
This command revokes folder access rights that were previously granted using JANUS FTP ALLOW.
Syntax
JANUS FTP portname DISALLOW foldername - TO [USER user] | [USGROUP usgroup] | ANONYMOUS | ALL
Where:
portname | Must be a previously defined Janus FTP Server port. | ||||||||
---|---|---|---|---|---|---|---|---|---|
foldername | A folder previously created with JANUS FTP ASSIGN. | ||||||||
TO | Specifies whose access to foldername is to be taken away. Users not previously specified by JANUS FTP ALLOW are ignored. One of these options must be specified:
|
An example DISALLOW command follows:
JANUS FTP FTP01 DISALLOW /PUB0 TO USER XXXX
JANUS FTP HOME
This command identifies the folder where an FTP user is placed when they log in.
Syntax
JANUS FTP portname HOME foldername - TO [USER user] | [USGROUP usgroup] | ANONYMOUS | ALL
Where:
portname | Must be a previously defined Janus FTP Server port. | ||||||||
---|---|---|---|---|---|---|---|---|---|
foldername | A folder previously created with JANUS FTP ASSIGN. | ||||||||
TO | The TO clause identifies for whom a home folder is to be set up. One of these options must be specified:
|
Note: All Janus FTP Server users must have a home folder assigned.
When a user logs in, the JANUS FTP HOME commands for the port are used as a rule set to select a home folder. The following steps are then applied to the home rule set to determine a home folder:
- If the user is anonymous and there is an anonymous entry, use it; but if there is no anonymous entry, reject the login.
- If the user is not anonymous, do the following:
- If an HOME rule specifies the user on a USER clause, use that folder.
- If no USER clause matches, but the user is in a group specified in an HOME rule USGROUP, use that folder.
- If no USGROUP group contains the user, but an ALL rule is present, use that folder.
- If no HOME rule matches, the login is rejected.
Example JANUS FTP HOME commands follow:
JANUS FTP FTP01 HOME /GLW2HOME TO USER GLW2 JANUS FTP FTP01 HOME /ALL TO ALL JANUS FTP FTP01 HOME /GLWHOME TO USGROUP FTP
JANUS FTP ON
This command lets you override the default processing of an FTP operation (service command) with your own version.
Syntax
JANUS FTP portname ON foldername | * - STOR | RETR | LIST | RNTO | DELE - [OPEN fg [[AND fg] ...]] CMD cmd [[AND cmd] ...] | DEFAULT
Where:
portname | Must be a previously defined Janus FTP Server port. | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
foldername | A folder previously created with JANUS FTP ASSIGN. If an asterisk (* ) is specified instead of a folder name, the override is used for all folders on the port. | ||||||||||||
STOR | RETR | LIST | RNTO | DELE | Names the operation being overriden (one of the following must be selected). For a list of all the FTP commands supported by Janus FTP Server, including those not available for override, see Janus FTP Server command reference.
| ||||||||||||
OPEN fg | Lists one or more files or groups to open before the commands specified on the CMD clause are run. If you specify multiple files or groups, they must be separated by AND keywords. Each fg term has the following format, where you can specify individual open privileges (which default to X'0221' ):
[FILE | GROUP] fgname [[WITH] privs] | ||||||||||||
CMD cmd | Lists one or more Model 204 commands to execute to perform the override. If more than one is specified, they must be separated by AND keywords. Any command that contains blanks must be enclosed in quotes. The total length of commands plus one overhead byte per command may not exceed 255 bytes. | ||||||||||||
DEFAULT | Resets any previous FTP ON for the folder, restoring the default handling of the operation specified in that ON rule. In short, to reverse an ON, use DEFAULT.
Note: For a given operation and folder, any previous ON rule must be be turned off with DEFAULT before a new FTP ON is issued. |
Example FTP ON commands follow:
JANUS FTP FTP05 ON /SPLAT STOR - OPEN FTPTEST WITH X'BFFF' CMD 'I POV.STOR' JANUS FTP FTP05 ON /SPLAT LIST - OPEN FILE FTPTEST CMD 'I POV.LIST' JANUS FTP FTP05 ON * LIST CMD 'SUB1'
JANUS FTP SUFFIX
This command lets you specify any file types that a Janus FTP Server should treat as text data for storage and translation purposes (even if received under BINARY transfer mode). This permits Janus FTP to work with those FTP clients that incorrectly send all files in BINARY mode, even those that are text data.
Syntax
JANUS FTP portname SUFFIX suffix [TEXT | DEFAULT]
Where:
portname | Must be a previously defined Janus FTP Server port. |
---|---|
suffix | A file-type suffix that ends a procedure name (preceded by a period in the procedure name). For example, you use HTML to match procedures whose names are of form WHATEVER.HTML . |
TEXT | Procedures with names ending in suffix will be handled as text data (not binary), even if the FTP transfer mode is BINARY. |
DEFAULT | Restores the default behaviour (no special handling); can be used to turn off a previously issued FTP SUFFIX command. |
The FTP protocol is based on the assumption that the FTP client will toggle between ASCII and BINARY mode as needed based on the type of the file. It is the client's responsibility to select the proper file transfer mode. Some (poorly behaved) FTP clients, however, send all files in BINARY mode.
Janus FTP Server uses base64 encoded format to store files that are uploaded (FTP put
or stor
) in BINARY FTP mode (type I). The FTP SUFFIX command is used to prevent text file types from being stored in base64.
Janus file storage formats are described further in the Janus Web Server documentation.
Example FTP SUFFIX commands follow:
JANUS FTP FTP01 SUFFIX HTML TEXT JANUS FTP FTP01 SUFFIX XML TEXT JANUS FTP FTP01 SUFFIX FOO DEFAULT