Git Product home page Git Product logo

vsftpdweb's Introduction

VsftpdWeb

VsftpdWeb is a simple web interface for vsftpd ftp server. Vsftpd needs to be configured to virtual users with mysql pam authentications. The web interface also needs change to sudoers file and shell access. It is inteneded for internal network use.

http://velkoff.net/vsftpdweb/

WARNING

Software is currently not compatible with php7 and does not follow modern php coding practices. It works as intended for the system that it was build for so you are free to use it if that is not a problem.

Install Instructions

Required Linux packages:

  • apache (or httpd)
  • mysql-server
  • php and php_mysql
  • pam_mysql
  • vsftpd

If php_mysql is missing only a blank page will be displayed and no errors will be produced.

Instalation steps:

  • set Short_tags=On in php.ini
  • copy VsftpdWeb files to /var/www/ (or /var/www/html for httpd)
  • create database vsftpd;
  • import the default schema: mysql vsftpd < VsftpdWeb/install_readme/vsftpd.sql
  • add a mysql user for vsftpd CREATE USER 'vsftpd'@'localhost' IDENTIFIED BY 'secureftp2014';
  • add privileges for his database GRANT ALL privileges ON vsftpd.* TO 'vsftpd'@'localhost' IDENTIFIED BY 'secureftp2014';
  • edit the database config file application/config/database.php

Now web interface should work. Default password is admin.

----Here web stuff should appear ok ----

Make another user just for vsftp: "adduser vsftpd". This is optional.

In the new home dir make an FTP directory and xferlog.log file. So there will be /home/vsftpd/FTP/ and /home/vsftpd/xferlog.log

Then the propper permissions whould be configured: chmod -R 770 /home/vsftpd chown -R vsftpd:apache /home/vsftpd

Copy the sample vsftpd.conf and paste it in /etc/vsftpd/vsftpd.conf

Now make changes to the last of the lines in the file.

guest_username=vsftpd 
local_root=/home/vsftpd/FTP/$USER   
user_config_dir=/etc/vsftpd/vusers
xferlog_file=/home/vsftpd/xferlog.log

guest_username is the user you made previously.

local_root and xferlog_file are the log and the main ftp location

mkdir /etc/vsftpd/vusers Set it to 777 access for now.

edit sudoers via "visudo" and add: www-data ALL = NOPASSWD: /bin/chown root /etc/vsftpd/vusers/[a-zA-Z0-9]* www-data ALL = NOPASSWD: /bin/rm /etc/vsftpd/vusers/[a-zA-Z0-9]* (or apache instead of www-data for httpd)

Edit the /etc/pam.d/vsftpd file with the sample vsftpd.pam file. change the username and password for the database. If debugging is necessary add "verbose=1 debug=1" at the end of each line.

If you have only one directory where you keep your FTP data, in the admin interface you should most likely use /home/vsftpd/ for "Disk path", "Disk2" and "Disk3".

The mail functionality needs a cron job for http://localhost/index.php/email send mail for mails and users in "mail" table for yesterday atm.

If you need to install in directory different than root edit the $config['base_url'] line in "\application\config\config.php"

##Enjoy!

vsftpdweb's People

Contributors

bogdanr avatar tvel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsftpdweb's Issues

Error when install in php7

I have get some error when run in php7

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; DBClass has a deprecated constructor in /home/ftp_user/ftp/inc/mysql_wrapper.php on line 30

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/ftp_user/ftp/inc/mysql_wrapper.php:48 Stack trace: #0 /home/ftp_user/ftp/inc/db_login.inc.php(33): DBClass->DBClass('localhost', 'vsftpd', 'vsftpd', 'vsftpdpass') #1 /home/ftp_user/ftp/index.php(35): require_once('/home/ftp_user/...') #2 {main} thrown in /home/ftp_user/ftp/inc/mysql_wrapper.php on line 48

I have get problem
https://stackoverflow.com/questions/34579099/fatal-error-uncaught-error-call-to-undefined-function-mysql-connect

PHP error was encountered

I have the following issues (Centos 7):

A PHP Error was encountered
Severity: Warning

Message: disk_free_space(): No such file or directory

Filename: models/disk_model.php

Line Number: 18

A PHP Error was encountered
Severity: Warning

Message: Division by zero

Filename: models/disk_model.php

Line Number: 22

A PHP Error was encountered
Severity: Notice

Message: Undefined offset: -9223372036854775808

Filename: models/disk_model.php

Line Number: 22

A PHP Error was encountered
Severity: Warning

Message: disk_free_space(): No such file or directory

Filename: models/disk_model.php

Line Number: 18

A PHP Error was encountered
Severity: Warning

Message: Division by zero

Filename: models/disk_model.php

Line Number: 22

A PHP Error was encountered
Severity: Notice

Message: Undefined offset: -9223372036854775808

Filename: models/disk_model.php

Line Number: 22

Can you help me, Thanks

Blank user settings page.

Hi @Tvel , the " FTP USER SETTINGS " tab gives a blank page when clicked .
Everything other tab displays the relevant page , but the FTP USER SETTINGS doesn't.
Can you please tell me how to fix it ?
It looks like this .

screenshot from 2018-03-28 15-44-15

User account can't login

Hi,

Once an account is created and I can see the folder in FTP folder, the database has the account created in table account, I can not login with it using an ftp client. I get "Login incorrect".

Any ideas?

Thank you,

dg

MD5 Encryption

In the install_readme folder we find an example pak file in which you use:

crypt=2

according to the PAM manual crypt settings are:

2 (or "mysql") = Use MySQL PASSWORD() function. It is possible that the encryption function used by pam-mysql is different from that of the MySQL server, as pam-mysql uses the function defined in MySQL's C-client API instead of using PASSWORD() SQL function in the query.

3 (or "md5") = Use MySQL MD5() function

in the file

users_model.php

I found that you use MD5 to encrypt.

As a result in my Ubuntu 12.0 LTS it doesn't work.

When I change my pam config to crypt=3, I get:

pam_mysql - non-crypt()ish MD5 hash is not supported in this build.

as a result I changed back to crypt=2 but I changed these two lines in users_model.php:

$q="INSERT INTO accounts (username, password, perm) VALUES ( '".$this->input->post('user')."', PASSWORD('".$this->input->post('upass')."'), 'r' ) ;";
$q="UPDATE accounts SET password = PASSWORD('$pass') WHERE id = '$id';";

Any thoughts from your end?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.