Configuration - Stshm/TrFtpd GitHub Wiki
General
Configuration file is [program root]/etc/trftpd.conf. If you want to change this path, modify source code.
In trftpd.js, modify following line.
pathConf = path.join(process.cwd(), 'etc/trftpd.conf');
In ftpwebadm.js, modify following line.
var config = conf.readConfig(path.join('etc','trftpd.conf'));
###Ftp server port
In trftpd.conf, modify following line. Default port is 8021.
CtrlPort = 8021
###User and group data files placement
In trftpd.conf, modify following line.
PathPasswd = 'etc/passwd'
PathGroup = 'etc/group'
###Ftp root directory path
In trftpd.conf, modify following line.
DirPathFiles = 'files'
###User home directory
In trftpd.conf, modify following line. This is used only by web interface. It must be under ftp root directory path.
DirPathUsers = '/users'
###TLS Key files
In trftpd.conf, modify following line.
-
For ftps
`FileTlsKey = 'etc/tls-key.pem'` `FileTlsCert = 'etc/tls-cert.pem'`
-
For https
`WebAdminFileTlsKey = 'etc/tls-key.pem'` `WebAdminFileTlsCert = 'etc/tls-cert.pem'`
Require openssl to create keyfiles
-
Exsamples
`openssl genrsa -out tls-key.pem 2048` `openssl req -new -key tls-key.pem -out tls-csr.pem` `openssl req -new -key tls-key.pem -out tls-csr.pem`
###System type
Modify reply to syst command. If not specfied, the server will be reply os.type() string.
SystemType = 'UNIX Type: L8'
###WebAdmin port
In trftpd.conf, modify following line.Default port is 9443.
WebAdminPort = 9443
###Logging
-
Log file path
`PathLog = 'logs/trftpd.log'`
-
Log format(%t = access date and time, %a = remote ip address, %u = user name, %p = command or reply, other messages)
`LogFormat = '[%t] - %a - %u - %p'`
-
Log level(of limited use currently)
`LogLevel = 3`
-
Debug mode(output verbose messages to console)
`Debug = true`