-
Notifications
You must be signed in to change notification settings - Fork 0
NanoFTPd FTP Server with MogileFS Backend
License
shoki/mogilefs-ftpd
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
mogilefs-ftpd ============= This is a FTP daemon based on nanoftpd written in PHP. It has a MogileFS backend that uses the MogileFS PECL extension. Basic upload, download, deletion is possible but not all FTP commands can be translated to MogileFS command (eg. chmod). The original nanoftpd version has been modified to be multi process capable and some unmaintained code has been removed. This is production safe quality software and we used it several month while migrating to MogileFS. Author: Andre Pascha <[email protected]> Original Nanoftpd Site: http://nanoftpd.sourceforge.net/ Original Nanoftpd Authors: Arjen <[email protected]> Phanatic <[email protected]> Installation ============ You need at least PHP 5.2.6 and these PHP extensions to run mogilefs-ftpd: * sockets * pcntl * posix * PECL MogileFS (>= 0.9.1) (https://pecl.php.net/mogilefs) * PECL proctitle (optional) There is a logrotate config and a init script available in the contrib directory. Configuration ============= adjust values in config.php and start the deamon. mogilefs->listlimit = 1000; limit of the list returned by LIST command. Set as low as possible for best performance. :) mogilefs->extendedlist = true; this will enable meta data lookup for every file in the LIST output. If you don't need the file length in the output, let this off to avoid lookups and speed up listing. mogilefs->searchlist = true; allow you to search mogilefs files via LIST <search prefix>. So LIST test will search for any files matching <class>/test*. mogilefs->canrename = true; allow rename commands to be translated into MogileFS commands. mogilefs->canmkdir = true; on mkdir command create a MogileFS class with the given directory name. mogielfs->canrmdir = true; on rmdir command delete a MogileFS class with the given directory name. mogilefs->mindevcount = 2; mindevcount parameter for creating MogileFS classes. mogilefs->defaultclass = "default"; mogilefs class to use when when uploading files in MogileFs_FlatNS. IO Modules ========== There is an IO module interface defined in modules/Io/Interface.php. You can implement your own modules and plug them into nanoftpd. There are some modules in modules/Io to illustrate what you can do with it. Io_File Basic file backend. No MogileFS Support. Io_MogileFs MogileFs Backend where the first directory level represents the MogileFs classes. MogileFs filenames are always prefixed by the current class. Io_MogileFs_FlatNS MogileFs Backend with flat namespace. All files get listed into the root directory. MogileFs class is taken from mogilefs->defaultclass when uploading files. Io_MogileFs_DomainNS MogileFs Backend with domain namespace. First directory level represents the MogileFs domains and the second the corresponding classes. Io_MogileFs_UserDomain MogileFs Backend where the logged in user is used as the MogileFS Domain. Auth Modules ============ You can create authentication plugins. Check the interface definition at modules/Auth/Interface.php. Currently only one module is implemented which used a text based user database. Hints ===== 1. default path convention is <mogilefs class>/<filename>. If your MogileFS is not using this convention you can still use this module but you may have to adjust io_mogilfs.php. 2. PHP error logs go to log/nanoftpd.err. Application logs go to log/nanoftpd.log 3. password for the shipped users in users text database is 'test'. 4. when listing files in classes there is a limit for the list. If you have a large MogileFS class it doesn't really makes sense to list millions of files (tough it is possible if you adjust the listlimit). 5. MKD command can create MogileFS classes and RMD can delete them. 6. you can even rename files in MogileFS using the RNFR RNTO commands. Compatibility ============= Used to work with: * PHP FTP extension of PHP 5.2.6 * FileZilla 3.3.5.1 on Ubuntu * Cyberduck Version 4.0.2 (8601) on MacOS X
About
NanoFTPd FTP Server with MogileFS Backend
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published