Xml FS: Configuring
From CFTP
filesystem.xml
Xml FS is based on a single XML configuration file e.g. filesystem.xml found in your FTP server. The original file contains comments and pre-configured directories with the most popular rules applied.
This library uses regular expressions to set restrictions on directories. You may use this tool to test your regular expressions when configuring the plug-in.
XML tags explained
| Tag | file-system/users-path |
| Explained | Directory where you store user home folders. This implementation demands that home directories of all users must be in one place. You can either set this as an absolute directory name (e.g. /usr/local/ftpusers) or as a relative name (relative to the server installation directory e.g. home). Note that some file system plug-ins demand this to be in an absolute form, so it is recommended to use an absolute directory. |
| Tag | file-system/users/user |
| Explained | This is a user's entry point. FTP user will be mapped to its entry point by the username tag described below. In case if the user does not have an entry point (unmapped user) she will not be able to send any file or list commands. But there is a way to set up the default entry point for unmapped users by setting the default attribute to any of the existing user tags, for example:
<user default="1"> <username>anonymous</username> <home/> </user> This will map all the unmapped users to the anonymous home. |
| Tag | file-system/users/user/username |
| Explained | User name, must match the user name in user's session after login. Must also match the name of the existing home directory. |
| Tags | file-system/users/user/home/properties | ||||
| **/home/virtual-folders/folder/properties | |||||
| Explained | Directory properties define allowed and forbidden actions and apply to the children of the directory (that means all the sub directories and files in the directory) but not to the directory itself. By default all actions are allowed unless specified otherwise.
Properties applied to sub directories do not apply any further (those do not apply to the children of sub directories) unless the spread attribute is set to 1. If the spread attribute is set to 1 then the properties apply to all the children inside a sub directory until another properties tag deep inside the folder tree defines new rules: <properties dir="/home/dir" spread="1"/> <properties dir="/home/dir/member/foo" spread="0"/> Before the explanation of the above example it is important to understand that we will be talking about directory children rather than the directory itself (that is what ** in every directory name mean). In the above example the first properties tag applies to /home/dir/**, /home/dir/member/** etc. but does not apply to /home/dir/member/foo/** and further down because there is a second properties tag which defines new rules for the children of /home/dir/member/foo/** directory. Note that the children sub directories and files inside /home/dir/member/foo/bar directory do not have any restrictions because the second properties tag does not spread onto it and there is no “properties” tag explicitly defined for /home/dir/member/foo/bar directory.
|
| Tag | **/properties/access | ||||||||
| Explained | Allow or forbid to access directories and files. If set to 0 then all that user can do is to see the name of an item via the LIST command and nothing else (more than that, user cannot enter the directory with access set to 0). You can have many access tags and you may apply the same tag to files, directories or both. Tag value must be either 0 or 1.
(You must specify at least one of those attributes) |
| Tag | **/properties/list |
| Explained | List or hide directories and files. Hidden items will not be included into the directory listing and as a result will not be visible in user's FTP client application but still may be accessible as this tag does not restrict anything. You can have many list tags and you may apply the same tag to files, directories or both.
Value and attributes are the same as for **/properties/access tag. |
| Tag | **/properties/create |
| Explained | Allow or forbid to create new files and directories. You can have many create tags and you may apply the same tag to files, directories or both.
Value and attributes are the same as for **/properties/access tag. |
| Tag | **/properties/append | ||||
| Explained | Allow or forbid to append files. You can have many append tags but those may only be applied to files. Tag value must be either 0 or 1.
|
| Tag | **/properties/overwrite |
| Explained | Allow or forbid to overwrite files. You can have many overwrite tags but those may only be applied to files.
Value and attributes are the same as for **/properties/append tag. |
| Tag | **/properties/rename |
| Explained | Allow or forbid to rename files and directories. You can have many rename tags and you may apply the same tag to files, directories or both.
Value and attributes are the same as for **/properties/access tag. |
| Tag | **/properties/delete |
| Explained | Allow or forbid to delete files and directories. You can have many delete tags and you may apply the same tag to files, directories or both.
Value and attributes are the same as for **/properties/access tag. |
NOTE
The default value of all the above tags is 1 (allow), but when set to 0 (forbid), the tags have these priorities: access, create, append, overwrite, rename, delete. If one tag is set to 0 the all the tags to the right of it will be set to 0 as well. That means when access is forbidden then all of the operations are forbidden, when rename is forbidden then delete is also forbidden because it stands to the right of rename (overwrite is unaffected because it stands to the left of rename).
| Tag | file-system/users/user/home/virtual-folders/folder/name |
| Explained | The name of a virtual folder. User will see this virtual name in the root of her home folder. |
| Tag | file-system/users/user/home/virtual-folders/folder/path |
| Explained | The path on your file system (e.g. hard drive) to mount this virtual folder to. |
Return to Library: Xml FS