· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
net2ftp

Installation instructions

  • À¥»ó¿¡¼­ FTP¸¦ ±¸ÇöÇØÁÖ´Â ÇÁ·Î±×·¥ ÀÔ´Ï´Ù.
  • Çѹø µÑ·¯ º¸´Ï ÁÁÀº°Å °°¾Æ ÀÏ´Ü ¿øº» ¿Ã¸®°í ³ªÁß¿¡ ¹ø¿ª Æ´Æ´È÷ ÇؾßÁÒ <- Delete me

  • Á¦°¡ À§Å° ¹®¹ýÀ» ¸ô¶ó ÀÌ»Ú°Ô ¿Å±âÁö¸¦ ¸øÇߴµ¥ Àß ¾Æ½Ã´ÂºÐ ÀÖÀ¸¸é À̻ڰÔÁ» ^^ <- Delete me

Requirements

Web server: any web server which can run PHP. The most popular one is Apache.

PHP: at least version 4.2.3. net2ftp works under Safe Mode.

Disk space: 1.5 MB for net2ftp, and a few MB for the temporary files.


Procedure

1 - Unzip all the files on your computer, and upload them to your server.


2 - The /temp directory should be chmodded to 777 (you can use net2ftp.com to do this).


3 - Set your settings in the settings.inc.php file.


4 - A database is only required if you want to log the actions of the users.

To create the tables, execute the SQL queries below (also in the "create_tables.sql" file). This can be done easily in PhpMyAdmin, the popular front-end to MySQL. ==
#
# Table structure for table `net2ftp_logAccess`
#

CREATE TABLE net2ftp_logAccess (
  date date NOT NULL default '0000-00-00',
  time time NOT NULL default '00:00:00',
  remote_addr text NOT NULL,
  remote_port text NOT NULL,
  http_user_agent text NOT NULL,
  page text NOT NULL,
  ftpserver text NOT NULL,
  username text NOT NULL,
  state text NOT NULL,
  manage text NOT NULL,
  directory text NOT NULL,
  file text NOT NULL,
  http_referer text NOT NULL
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `net2ftp_logError`
#

CREATE TABLE net2ftp_logError (
  date date NOT NULL default '0000-00-00',
  time time NOT NULL default '00:00:00',
  ftpserver text NOT NULL,
  username text NOT NULL,
  message text NOT NULL,
  cause text NOT NULL,
  drilldown text NOT NULL,
  state text NOT NULL,
  manage text NOT NULL,
  directory text NOT NULL,
  debug1 text NOT NULL,
  debug2 text NOT NULL,
  debug3 text NOT NULL,
  debug4 text NOT NULL,
  debug5 text NOT NULL,
  remote_addr text NOT NULL,
  remote_port text NOT NULL,
  http_user_agent text NOT NULL
) TYPE=MyISAM;
# --------------------------------------------------------

#
# Table structure for table `net2ftp_logLogin`
#

CREATE TABLE net2ftp_logLogin (
  date date NOT NULL default '0000-00-00',
  time time NOT NULL default '00:00:00',
  ftpserver text NOT NULL,
  username text NOT NULL,
  remote_addr text NOT NULL,
  remote_port text NOT NULL,
  http_user_agent text NOT NULL
) TYPE=MyISAM;
# --------------------------------------------------------
#
# Table structure for table `net2ftp_logConsumptionFtpserver`
#

CREATE TABLE net2ftp_logConsumptionFtpserver (
  date date NOT NULL default '0000-00-00',
  ftpserver varchar(255) NOT NULL default '0',
  dataTransfer int(10) unsigned default '0',
  executionTime mediumint(8) unsigned default '0',
  PRIMARY KEY  (date,ftpserver)
) TYPE=MyISAM;
# --------------------------------------------------------
#
# Table structure for table `net2ftp_logConsumptionIpaddress`
#

CREATE TABLE net2ftp_logConsumptionIpaddress (
  date date NOT NULL default '0000-00-00',
  ipaddress varchar(15) NOT NULL default '0',
  dataTransfer int(10) unsigned default '0',
  executionTime mediumint(8) unsigned default '0',
  PRIMARY KEY  (date,ipaddress)
) TYPE=MyISAM;

        

Next steps

  • Set authorizations in settings_authorizations.inc.php:
    • Allow the users to connect to any FTP server, or only to a restricted list of FTP servers

    • Ban certain FTP servers

    • Ban certain IP addresses; users connecting from these addresses will not be able to use the website

    • Allow the users to connect to any FTP server port, or only to one port

    • Set the default login directory -- this is not restrictive, users can get out of it

    • Set the default root directory per user -- this is restrictive, users cannot get out of it when they are using net2ftp. However, this is not a secure method of restricting the access; it is much safer to set this on the FTP server itself

  • To allow large file uploads and transfers, you may have to change these settings:

    • in the file php.ini (directory C:\windows or /etc): upload_max_filesize, post_max_size, max_execution_time, memory_limit

    • in the file php.conf (directory /etc/httpd/conf.d): LimitRequestBody

  • Protect the /temp and the /admin directories. If you use the Apache web server, use .htaccess and .htpasswd files to do this -- sample files are provided (username admin, password net2ftp).

    • .htaccess file: set the path to the .htpasswd file

    • .htpasswd file: enter a list of usernames and encrypted passwords (the admin panel can be used to generate encrypted passwords)

  • In your php.ini file, register_globals can be set to "off" (this is more secure), but the application will off course also work if it is set to "on".

  • The files are transmitted using the BINARY mode by default. There is a list of file extensions (txt, php, ...) which are transmitted in ASCII mode. Edit this list if needed, it is located in /includes/filesystem.inc.php. Look for function ftpAsciiBinary.

  • When a file is edited in the textarea, and transferred using the ASCII mode, net2ftp replaces CR-LF by LF. This is because some FTP servers replace LF by CR-LF. This is done in file /includes/filesystem.inc.php, in the function ftp_writefile. (CR = Carriage Return = ASCII character 13. LF = Line Feed = ASCII character 10.)

NOTE: IF YOUR WEB SERVER RUNS ON WINDOWS

If you can log in but you cannot see any directory or file in the Browse Screen, then it is probably caused by a filesystem permission problem on your web server.

NOTE: IF YOUR FTP SERVER IS THE IIS FTP SERVER

In the FTP server's configuration, set it for UNIX style directory listings rather than MSDOS style listings.

Known bugs and limitations

  • Symlinks are not yet handled well. Currently, they are displayed on the Browse Screen, but you can't do anything with it except clicking on the name. If the symlink points to a directory, you will be directed to that directory -- but if it points to a file, net2ftp will redirect you to the root directory of the FTP server instead of downloading the file...

  • The root directory authorizations can currently only be set per user -- not per user and FTP server. This limitation will be solved in one of the next versions.



sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-09-08 01:07:32
Processing time 0.0067 sec