christianbeer / proftpd-admin Goto Github PK
View Code? Open in Web Editor NEWGraphical User Interface for ProFTPd with MySQL support
License: GNU General Public License v2.0
Graphical User Interface for ProFTPd with MySQL support
License: GNU General Public License v2.0
There's an error in README.MD for sqlite3 section:
SQLNamedQuery updatecount UPDATE "login_count=login_count+1, last_login=now() WHERE userid='%u'" users
now() is not supported in sqlite, there should be date() function.
The header links to index.php twice. One link has the text Home and one has ProFTPdAdmin, which links one directory higher (which is a bug).
Hello, I can't create group, please help;
mysql Ver 8.0.20-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))
PHP 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS )
PHP 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS )
[Tue Jul 14 15:51:29.248120 2020] [php7:warn] [pid 85779] [client 192.168.0.3:46664] PHP Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups WHERE gid="1000"' at line 1 in /var/www/proftpd/includes/ez_sql_mysqli.php on line 272, referer: http://192.168.0.3/proftpd/add_group.php
[Tue Jul 14 15:51:29.248154 2020] [php7:notice] [pid 85779] [client 192.168.0.3:46664] PHP Notice: Trying to access array offset on value of type null in /var/www/proftpd/includes/ez_sql_core.php on line 170, referer: http://192.168.0.3/proftpd/add_group.php
[Tue Jul 14 15:51:29.248264 2020] [php7:warn] [pid 85779] [client 192.168.0.3:46664] PHP Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups (groupname,gid,members) VALUES ("admins","1000","")' at line 1 in /var/www/proftpd/includes/ez_sql_mysqli.php on line 272, referer: `http://192.168.0.3/proftpd/add_group.php`
Hi guys,
Have you planned to create home directory for each new users ?
When i create an user on your excellent GUI, protpd can see it but i need to create directory for each user directories :/
from James Shaw:
If no uses are present the users page it shows the following warning message.
Warning: Invalid argument supplied for foreach() in /var/www/ftpadminnew/users.php on line 58
if no groups are present on the groups page it shows the following:
Warning: Variable passed to each() is not an array or object in /var/www/ftpadminnew/groups.php on line 32
These message do not appear as soon as there are groups and users.
It would be nice to be able to also set an password expiration date in the UI and store that in the database for Proftpd to check against.
proftpd[31025]: fatal: SQLAuthTypes: unknown SQLAuthType 'SHA1'
from http://www.proftpd.org/docs/directives/configuration_full.html
SQLAuthTypes
Name
SQLAuthTypes -- Specify the allowed authentication types and their check order
Synopsis
SQLAuthTypes [ [OpenSSL]] [ [Crypt]] [ [Backend]] [ [Plaintext]] [ [Empty]]
Default
none
Context
server config, ,
Module
mod_sql
Compatibility
1.2.0 and later
Description
This directive deprecates 'SQLEmptyPasswords', 'SQLScrambledPasswords', 'SQLSSLHashedPasswords', 'SQLPlaintextPasswords', and 'SQLEncryptedPasswords'.
The SQLAuthTypes directive specifies which authentication method are to be allowed, and their order of use. You must specify at least one authentication method.
The current supported authentication methods are:
Backend
Allows database-specific backend passwords. Not all backend databases support this option. For example, MySQL datatabases use this option to authenticate MySQL 'PASSWORD()' encrypted passwords. The Postgres backend, however, does nothing.Caveat : if your MySQL activity log is world-readable, the user password will be visible . You have been warned.
Crypt
Allows passwords in the database to be of Unix crypt(3) form.
Empty
Allows empty passwords in the database, which match against any password the user may give. The database field must be a truly empty string; NULL values are not acceptable as empty passwords. Be very careful if using this authentication method.
OpenSSL
Allows passwords in the database to be of the form '{digest-name}hashed-value', where hashed-value is the base64-encoded digest of the passsword. Only available if you define HAVE_OPENSSL when you compile proftpd and you link with OpenSSL's libcrypto library.
Plaintext
Allows passwords in the database to be in plaintext.
See also
Examples
SQLAuthTypes Crypt Empty
configures mod_sql to first attempt to verify the password using the Unix crypt(3) function, then, if that fails, determine if the password in the database is empty (thus matching any given password). If all of the configured authentication methods fail, mod_sql will fail to authenticate the user.
In the readme it says
"SQLNamedQuery updatecount UPDATE "login_count=login_count+1, last_login=datetime() WHERE userid='%u'" users"
The function datetime() is incorrect, you have to use "NOW()" instead.
I was getting this error in my proftpd.log files because of this:
mod_sql/4.3: unrecoverable backend error: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '() WHERE userid='test'' at line 1
Hi,
Can't get proftpd-d admin to work with :
I have configured configs/config_example.php and moved it to configs/config.php
Incorrect datetime value: '0000-00-00 00:00:00' for column 'last_login' at row 1 in /var/www/main/ftpadmin/includes/ez_sql_mysqli.php on line 272
After i updated my MySQL to 5.7.22
Is it possible to make that group settings include some common settings for new creating users n this group?
proftpd[31005]: fatal: unknown configuration directive 'SQLPasswordEngine'
I not found in http://www.proftpd.org/docs/directives/configuration_full.html
I install the lastest version but is impossible to login. I'm login only with real user.
`SQLBackend mysql
SQLEngine on
#SQLPasswordEngine on
#SQLAuthenticate users*
SQLPasswordEncoding hex
SQLAuthTypes SHA1
SQLConnectInfo proftpd_admin@localhost root pass
SQLUserInfo users userid passwd uid gid homedir shell
SQLGroupInfo groups groupname gid members
SQLUserWhereClause "disabled != 1"
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "login_count=login_count+1, last_login=now() WHERE userid='%u'" users
SQLLog RETR bytes-out-count
SQLNamedQuery bytes-out-count UPDATE "bytes_out_used=bytes_out_used+%b WHERE userid='%u'" users
SQLLog RETR files-out-count
SQLNamedQuery files-out-count UPDATE "files_out_used=files_out_used+1 WHERE userid='%u'" users
SQLLog STOR bytes-in-count
SQLNamedQuery bytes-in-count UPDATE "bytes_in_used=bytes_in_used+%b WHERE userid='%u'" users
SQLLog STOR files-in-count
SQLNamedQuery files-in-count UPDATE "files_in_used=files_in_used+1 WHERE userid='%u'" users
`
Just installed it, followed the instructions on the README document but whenever I login it comes back to the login page.
I'm using nginx 1.10.3 and php 7.0.27 on a debian distro.
Getting a lot of 304 on the nginx log though...
Hi,
I wondering how I can create a user with specific privileges.
For example, with a folder /home/users/blahblah, I want to create a user who can only download files (like anonymous but with a password :-) )
It's possible ?
Thanks.
F.
Do you know if the project here is still maintained?
Do you know if someone could check the information to be reconciled from the fork Secure version?
(2016) https://github.com/ChristianBeer/ProFTPd-Admin/issues
Last change 2016
Fork -> (2017) https://github.com/mkkeck/ProFTPd-Admin-Secure-Version
Last change 2017
Any CDN where I could download a tar.gz of this project from?
see above
Hi,
I have Php v.7.4. And when I'm trying create first group there is error and in error.log I have:
[Tue Mar 07 23:46:42.335206 2023] [php7:notice] [pid 5100] [client 193.164.255.18:50281] PHP Notice: Undefined index: comment in /var/www/html/ProFTPd-Admin/add_user.php on line 135, referer: http://test.sdata.net.pl:8080/add_group.php
[Tue Mar 07 23:46:46.616239 2023] [php7:warn] [pid 5100] [client 193.164.255.18:50281] PHP Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups ORDER BY gid ASC' at line 1 in /var/www/html/ProFTPd-Admin/includes/ez_sql_mysqli.php on line 272, referer: http://test.sdata.net.pl:8080/add_user.php
[Tue Mar 07 23:47:21.609962 2023] [php7:warn] [pid 5102] [client 193.164.255.18:50294] PHP Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups WHERE groupname="pierwsza"' at line 1 in /var/www/html/ProFTPd-Admin/includes/ez_sql_mysqli.php on line 272, referer: http://test.sdata.net.pl:8080/add_group.php
[Tue Mar 07 23:47:21.610064 2023] [php7:notice] [pid 5102] [client 193.164.255.18:50294] PHP Notice: Trying to access array offset on value of type null in /var/www/html/ProFTPd-Admin/includes/ez_sql_core.php on line 170, referer: http://test.sdata.net.pl:8080/add_group.php
[Tue Mar 07 23:47:21.610179 2023] [php7:warn] [pid 5102] [client 193.164.255.18:50294] PHP Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups WHERE gid="1101"' at line 1 in /var/www/html/ProFTPd-Admin/includes/ez_sql_mysqli.php on line 272, referer: http://test.sdata.net.pl:8080/add_group.php
[Tue Mar 07 23:47:21.610197 2023] [php7:notice] [pid 5102] [client 193.164.255.18:50294] PHP Notice: Trying to access array offset on value of type null in /var/www/html/ProFTPd-Admin/includes/ez_sql_core.php on line 170, referer: http://test.sdata.net.pl:8080/add_group.php
[Tue Mar 07 23:47:21.610296 2023] [php7:warn] [pid 5102] [client 193.164.255.18:50294] PHP Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups (groupname,gid,members) VALUES ("pierwsza","1101","")' at line 1 in /var/www/html/ProFTPd-Admin/includes/ez_sql_mysqli.php on line 272, referer: http://test.sdata.net.pl:8080/add_group.php
Could you help ?
Thank you.
Hi,
I have an error when trying to login
mod_sql/4.3: checking password using SQLAuthType 'sha1'
mod_sql/4.3: 'sha1' SQLAuthType handler reports failure
I tried it also with pbkdf2 (same error)
Proftpd version is 1.3.5
I have loaded also
LoadModule mod_sql.c
LoadModule mod_sql_mysql.c
LoadModule mod_sql_passwd.c
Hi,
I want to use your project as a UI for a proftpd server but I don't want to only be able to create users from the ui. I am trying to create a user by inserting a record to the database but I am having issues with the password field. Can you tell me how you encrypt the password entries in the database so I could do the same from a shell?
my config.php file has:
$cfg['passwd_encryption'] = "SHA1";
P.S:
if you have implemented a way to use the UI with REST it would be better
Thanks
HI,
I want to run an FTP service as a docker image.
I have a proftp docker image and an httpd docker image. Now I want to use the proftpd-admin in a different docker image. Is it possible to have proftpd-admin and proftpd on different containers?
If it is, can you please tell me how to do that?
I would gladly submit a PR once its done :)
If I try to delete or modify an user I get the following error:
Cannot remove user "test" from group ""; see log files for more information.
apache log records the following line:
PHP Notice: Undefined variable: ggroup in remove_user.php on line 44,
I am running CentOS 6 with apache 2.4 and PHP7
SHA1 is not working in SQLAuthTypes. Only Crypt or Plaintext. I configured for mysql. And SQLPasswordEngine also not supported.
It is not possible to create accounts with Uppercase letter(s)
You need tocreate it with all Lowercase and change it aftewards in the Database.
Is there a reason why this not works?
TXS!!
It would be nice to have some screenshots in README. I needed it to check if it's visually 'ready' to give it to customers.
Hi,
How hard would it be to add SQLite support?
I'm planning on packaging ProFTPd-Admin for a NAS device, and I would like to have it self-contained, i.e., not depending on MySQL.
If this is not on your plans, would it be ok for me to give it a try? If so, could you give me some pointers where to look in the source code?
Thanks,
Ricardo
Hello! I have installed proftpd and your tools on Freebsd 9 server.
My proftpd have these SQLAuthTypes: Backend, Crypt, Empty, Paintext, OpenSSL. But in ProFTPd-Admin config.php i can set just only SHA1 or MD5. What can i do?
Either split into $cfg['field_ugid'] and $cfg['field_ggid'] for the user and group table or only define once.
Hi, i've installed this GUI but right now im stuck when i neet to add group it says i am using prohibited characters.. which isnt true.. same with group name: test and gid: 1001
in /var/log/apache2/error.log
PHP Notice: Undefined variable: cfg in /var/www/proftpd/includes/AdminClass.php on line 17, referer: http://myhostname/ftpadmin/groups.php
and there I'm in the end..
and in install guide you have "Debian: apt-get install proftpd-mysql" which is obsolete
now its "proftpd-mod-mysql"
and config is separated to two files:
/etc/proftpd/proftpd.conf
CreateHome on 775
AuthOrder mod_sql.c
and /etc/proftpd/sql.conf
whre you need to add all "SQL" lines form your guide..
i think i'm doing something wrong but what?
ps: sorry for my english :)
Hi,
any plans to add postgres support?
Best Regards,
Kristijan
Hi guys,
Your web GUI is awesome !! Everything are ok but i have a problem when i try to connect my new user on my ftp via proftpd..
I have this message in proftpd logs :
mod_sql/4.3: unrecoverable backend error: (1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '() WHERE userid='cts'' at line 1
I think my sql version don't understand this request from SQLNamedQuery :
updatecount UPDATE "login_count=login_count+1, last_login=datetime() WHERE userid='%u'" users
Thx for all !
defined group and added test user bozo. user is created in db but proftpd says:
Feb 5 21:28:39 Tower proftpd[20949]: 127.0.0.1 (192.168.178.98[192.168.178.98]) - USER bozo (Login failed): No such user found.
Hi Christian,
when trying to import tables.sql I get the following error:
SQL-Befehl:
users
CREATE TABLE users
(
id
smallint( 2 ) NOT NULL AUTO_INCREMENT ,
userid
varchar( 20 ) NOT NULL default '',
uid
int( 10 ) unsigned NOT NULL default '',
gid
int( 10 ) unsigned NOT NULL default '',
passwd
varchar( 255 ) NOT NULL default '',
homedir
varchar( 255 ) NOT NULL default '',
comment
varchar( 255 ) NOT NULL default '',
disabled
int( 10 ) unsigned NOT NULL default '0',
shell
varchar( 20 ) NOT NULL default '/sbin/nologin',
email
varchar( 255 ) NOT NULL default '',
name
varchar( 255 ) NOT NULL default '',
bytes_in_used
bigint( 20 ) NOT NULL default '0',
bytes_out_used
bigint( 20 ) NOT NULL default '0',
login_count
bigint( 20 ) NOT NULL default '0',
files_in_used
bigint( 20 ) NOT NULL default '0',
files_out_used
bigint( 20 ) NOT NULL default '0',
last_login
datetime default NULL ,
PRIMARY KEY ( id
)
) TYPE = InnoDB;
MySQL meldet: Dokumentation
#1067 - Invalid default value for 'uid'
Anything special I have to do when importing? Its really great you picked up
ProFTPDAdmin :)
Michael
The icludes in AdminClass.php need an if switch on what DB Layer should be included which is available as $cfg['db_type'].
I'm using the "-" (minus) as prefix separator but it's not working with the new bootstrap gui.
Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /ftpadmin/includes/AdminClass.php on line 102
This is since ive updated my php version to 7.2.
I need to allow for multiple vhosts with sometimes multiple ie; fred and jane users at different domains on the same physical server so it would be useful to be able to user [email protected] and [email protected] instead of say fred1 and fred2. ATM I have to manually change the login usernames with phpmyadmin and it works just fine so it seems that the ProFTPd-Admin username restriction to a-zA-Z0-9-_ is not strictly necessary.
Update: doh, I just noticed $cfg['userid_regex'] so I do have control over the user login names.
HI,
When I try to delete a user in the proftpd admin web console, I get the following error:
Cannot remove user "test" from group ""; see log files for more information
Can you please advise?
I got it working using MySQL. And now im attempting to do this with SQLite for a automated installer...
When i goto add a user, (Adding Groups works fine). I get these errors..
[Tue Sep 05 04:41:08.805169 2017] [mpm_prefork:notice] [pid 28313] AH00163: Apache/2.4.10 (Debian) mod_scgi/1.13 OpenSSL/1.0.1t configured -- resuming normal operations
[Tue Sep 05 04:41:08.805202 2017] [core:notice] [pid 28313] AH00094: Command line: '/usr/sbin/apache2'
[Tue Sep 05 04:41:11.708757 2017] [:error] [pid 28316] [client 24.254.146.153:38754] PHP Warning: SQLite3::query(): Unable to prepare statement: 1, no such function: SHA1 in /srv/rutorrent/home/ftpadmin/includes/ez_sql_sqlite3.php on line 146, referer: https://black.justla.me/ftpadmin/add_user.php
[Tue Sep 05 04:41:11.708825 2017] [:error] [pid 28316] [client 24.254.146.153:38754] PHP Notice: Undefined index: ad_gid in /srv/rutorrent/home/ftpadmin/add_user.php on line 127, referer: https://black.justla.me/ftpadmin/add_user.php
[Tue Sep 05 04:41:11.709180 2017] [:error] [pid 28316] [client 24.254.146.153:38754] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /srv/rutorrent/home/ftpadmin/add_user.php on line 210, referer: https://black.justla.me/ftpadmin/add_user.php
I've had in mind to send the new created user an email with the login details for his / her FTP-Account if an Email was saved. Maybe I try to implement it later if I have some spare time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.