glaskoncILLa je napisao/la:gdje ih chroota? mislim, ne bi li trebali imati nekakva prava na bilo koji direktorij u koji uskoce?
Po defaultu ih chroota (no, nije to sistemski chroot kroz komandu, vec njegov built-in mehanizam) ih u dir koji si im stavio kao home (-d switch), ne moras niti kreirati $HOME virtualnom korisniku na filesystemu, samo moras vrtiti pure-ftpd s -j argumentom a $HOME ce se kreirati sam prilikom korisnickog logina (nesto poput PAM-ovog pam_mkhomedir.so)
Npr., fizicki korisnik ima $HOME postavljen kao /opt, virtualni ima $HOME /opt/bla, virtualni ce biti chrootan unutar /opt/bla.
redtux vjerojatno ne vrti pure-ftpd s -j switchem, pa je i imao onaj problem s nepronalaskom direktorija virtualnog korisnika (inace bi se direktorij kreirao automatski).
Uglavnom, izuzetno fora FTP daemon.
When you're a kid and you wanna go "Weee !", but you ain't got drugs yet ... You hold out for your life, hold on to your little GONADS ... and STRIFE.
mysql> show create database pureftpd\G
*************************** 1. row ***************************
Database: pureftpd
Create Database: CREATE DATABASE `pureftpd` /*!40100 DEFAULT CHARACTER SET latin1 */
1 row in set (0.00 sec)
mysql> show variables like "character_set_database";
+------------------------+--------+
| Variable_name | Value |
+------------------------+--------+
| character_set_database | latin1 |
+------------------------+--------+
1 row in set (0.00 sec)
mysql> show variables like "collation_database";
+--------------------+-------------------+
| Variable_name | Value |
+--------------------+-------------------+
| collation_database | latin1_swedish_ci |
+--------------------+-------------------+
1 row in set (0.00 sec)
mysql> use pureftpd;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> SELECT language FROM userlist WHERE user='admin';
ERROR 1054 (42S22): Unknown column 'language' in 'field list'
tail /var/log/httpd/error_log
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/db_info.inc.php on line 88, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1483, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1484, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1486, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/db_info.inc.php on line 93, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1483, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1484, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:35:30 2012] [error] [client XX.XX.XX.XX] PHP Warning: strftime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CET/1.0/no DST' instead in /usr/share/phpmyadmin/libraries/common.lib.php on line 1486, referer: http://home.domena.com/phpmyadmin/index.php?db=pureftpd&token=fa300cbd8a6145f3e9550641fd51787e
[Thu Nov 29 10:36:07 2012] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
[Thu Nov 29 10:41:07 2012] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /var/www/html/
Po cemu moze nastetit sustavu (ako mislis na OS) promjene po mysql-u, jer koliko vidim ono sto bi trebao napravit iz tvog posta je iskljucivo promjena char encodinga
mysql> use pureftpd;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> ALTER DATABASE pureftpd CHARACTER SET utf8;
Query OK, 1 row affected (0.00 sec)
mysql> ALTER TABLE ftpd CHARACTER SET utf8;
Query OK, 0 rows affected (0.11 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE settings CHARACTER SET utf8;
Query OK, 8 rows affected (0.04 sec)
Records: 8 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE userlist CHARACTER SET utf8;
Query OK, 2 rows affected (0.05 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> show create database pureftpd\G
*************************** 1. row ***************************
Database: pureftpd
Create Database: CREATE DATABASE `pureftpd` /*!40100 DEFAULT CHARACTER SET utf8 */
1 row in set (0.00 sec)
mysql> use pureftpd;
Database changed
mysql> show variables like "character_set_database";
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| character_set_database | utf8 |
+------------------------+-------+
1 row in set (0.00 sec)
mysql> show variables like "collation_database";
+--------------------+-----------------+
| Variable_name | Value |
+--------------------+-----------------+
| collation_database | utf8_general_ci |
+--------------------+-----------------+
1 row in set (0.00 sec)
/etc/init.d/pure-ftpd restart
Stopping pure-ftpd: [ OK ]
Starting pure-ftpd: [ OK ]
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: User in /var/www/html/pure-ftpd-webui/lang/english.php on line 39, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: User in /var/www/html/pure-ftpd-webui/lang/english.php on line 41, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: User in /var/www/html/pure-ftpd-webui/lang/english.php on line 43, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: User in /var/www/html/pure-ftpd-webui/lang/english.php on line 45, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: User in /var/www/html/pure-ftpd-webui/lang/english.php on line 47, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: User in /var/www/html/pure-ftpd-webui/lang/english.php on line 49, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: user in /var/www/html/pure-ftpd-webui/lang/english.php on line 100, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: user in /var/www/html/pure-ftpd-webui/lang/english.php on line 102, referer: http://home.domena.com/pure-ftpd-webui/index.php
[Thu Nov 29 13:59:03 2012] [error] [client XX.XX.XX.XX] PHP Notice: Undefined index: user in /var/www/html/pure-ftpd-webui/lang/english.php on line 104, referer: http://home.domena.com/pure-ftpd-webui/index.php
lajne u /var/www/html/pure-ftpd-webui/lang/english.php:
$um_edit_loginok = "Login $array[User] successfully changed to $User";
$um_edit_loginerror = "ERROR: $result";
$um_edit_statusok = "$array[User] status successfully changed";
$um_edit_statuserror = "ERROR: $result";
$um_edit_passwdok = "$array[User] password successfully changed";
$um_edit_passwderror = "ERROR: $result";
$um_edit_ullimitok = "Upload speed limit for user $array[User] successfully changed";
$um_edit_ullimiterror = "ERROR: $result";
$um_edit_dllimitok = "Download speed limit for user $array[User] successfully changed";
$um_edit_dllimiterror = "ERROR: $result";
$um_edit_permipok = "Permitted IP-address for user $array[User] successfully changed";
$um_edit_permiperror = "ERROR: $result";
$um_edit_quotasizeok = "Quota for uploaded/downloaded data size for user $array[User] successfully changed";
$um_edit_quotasizeerror = "ERROR: $result";
$um_edit_quotafilesok = "Quota for uploaded/downloaded files count for user $array[User] successfully changed";
$um_edit_quotafileserror = "ERROR: $result";
Pure ftpd web ui i dalje ima error.
Ukoliko proizlazi iz okvira forum helpa, onda eventualno mozda netko ima savjet za neko drugo web rjesenje, kako sam i pitao u prvom postu (ukoliko ovo bude nerijeseno). Nadalje, spreman sam i platiti svaki oblik pomoci i korisnih informacija.
+----+-------+----------------------------------+
| id | user | pass |
+----+-------+----------------------------------+
| 1 | admin | h4shp4ss|
| 2 | ftp | h4shp4ss|
+----+-------+----------------------------------+
2 rows in set (0.00 sec)
Znaci usera 'public' sam napravio preko pure-pw komande, i on mi se nalazi u pureftpd.pdb, a uera 'ftp' sam napravio preko INSERT-a u bazi. Oba rade sto se tice spajanja na ftp i oba imaju mapiran /opt kao root.