19.7.2. FTP Server
Virtuoso can provide FTP access to its WebDAV repository. This
FTP server functionality relies on the same credentials and permissions that
WebDAV uses. The server is enabled by listing the
FTPServerPort
parameter in the
HTTPServer
section of the Virtuoso INI
file. This parameter must be accompanied by a port number to listen at.
[HTTPServer] FTPServerPort = 21
Will instruct Virtuoso to listen for FTP requests on the default FTP port of 21.
[HTTPServer] ... FTPServerTimeout = 600 ...
To control timeout of connections use "FTPServerTimeout" ini parameter. The default time out is 600 sec. This is only for command connection.
The Virtuoso FTP server can be instructed to create a session log file using the parameter:
[HTTPServer] ... FTPServerLogFile = ftpserver ...
If specified Virtuoso will produce an FTP server log file with the date appended to the name given in the parameter and the files extension as ".log". The log file is rotated daily. It will contain the following information:
ftpserverDDMMYYYY.log
:-
Client Host Name |
Authorized User |
Time |
User Command |
Server Response Code |
Bytes Transferred |
An example of which is:
hostname anonymous [22/Oct/2003:15:21:43 +0300] "PASS user@domain.com" 230 0 hostname anonymous [22/Oct/2003:15:23:11 +0300] "LIST" 226 162 hostname dav [22/Oct/2003:15:25:00 +0300] "PASS <hidden>" 230 0
Virtuoso can allow special "anonymous" user access to the FTP Server by supplying the following Virtuoso INI file parameter:
[HTTPServer] ... FTPServerAnonymousLogin = 0 ...
The anonymous user is not a real user, it has no SQL or DAV login ability. The anonymous user can only access collections or resources that are set to public. The password of the anonymous user is trivially checked to contain the "@" symbol and is shown in plain-text for the "PASS" command detailed in the log file. Valid DAV users passwords are never revealed in the FTP log file. By default anonymous login is denied.
[HTTPServer] ... FTPServerAnonymousHome = /DAV/dir_name/ ...
You can control the anonymous user home dir by "FTPServerAnonymousHome" parameter in the ini fail. By default home dir for anonymous user is DAV root dir.
The Virtuoso server supports the usual variety of commands such as:
USER PASS CWD CDUP HELP QUIT PORT PASV TYPE NOOP STOR RNFR RNTO MODE RETR DELE RMD MKD PWD SYST SIZE LIST NLST ABOR
By default the server uses free ports within the range 20000 - 30000 for passive
mode connections. This is configurable using the parameters:
FTPServerMinFreePort
and
FTPServerMaxFreePort
in the
HTTPServer
section of the
Virtuoso INI file.
The FTP server root directory is the home directory of the authenticated DAV user.