Ich muss nochmal aktualisieren.
chown -R mywebsite:www-data /var/www/DOMAIN/htdocs
Klappt nicht. Hatte es die letzten tage etwas aus den Augen verloren. Aber der webserver hat dann keine Rechte mehr:
Warning: file_put_contents(/etc/nginx/html/DOMAIN/modules/ebay/classes/../log/request.txt): failed to open stream: Permission denied in /etc/nginx/html/DOMAIN/modules/ebay/classes/EbayRequest.php on line 1069
Das zieht sich durch jede Datei, die gebraucht wird.
Wie bekomme ich jetzt den FTP User und den user www-data dazu Schreibrechte zu haben?
Außerdem spuckt Filezilla das aus:
Status: Verbindung zum Server getrennt
Status: Verbinde mit xxx.xxx.55.21:21...
Status: Verbindung hergestellt, warte auf Willkommensnachricht...
Antwort: 220 (vsFTPd 3.0.2)
Befehl: AUTH TLS
Antwort: 234 Proceed with negotiation.
Status: Initialisiere TLS...
Status: Überprüfe Zertifikat...
Status: TLS-Verbindung hergestellt.
Befehl: USER mywebsite
Antwort: 331 Please specify the password.
Befehl: PASS ********************
Antwort: 230 Login successful.
Status: Der Server unterstützt keine Nicht-ASCII-Zeichen.
Befehl: PBSZ 0
Antwort: 200 PBSZ set to 0.
Befehl: PROT P
Antwort: 200 PROT now Private.
Status: Angemeldet
Status: Empfange Verzeichnisinhalt...
Befehl: PWD
Antwort: 257 "/"
Befehl: TYPE I
Antwort: 200 Switching to Binary mode.
Befehl: PASV
Antwort: 227 Entering Passive Mode (xxx,xxx,55,21,246,141).
Befehl: LIST
Alles anzeigen
Die vsftpd.conf sieht so aus:
listen=YES
listen_ipv6=NO
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
nopriv_user=www-data
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
local_umask=022
allow_writeable_chroot=YES
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
ssl_enable=YES
ssl_enable=YES
allow_anon_ssl=NO
Alles anzeigen
die passwd sieht so aus:
mywebsite:x:1001:1001:,,,:/etc/nginx/html/mywebsite:/bin/false
/etc/pam.d/vsftpd hat den Inhalt:
# Standard behaviour for ftpd(8).
auth required pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
# Note: vsftpd handles anonymous logins on its own. Do not enable pam_ftp.so.
# Standard pam includes
@include common-account
@include common-session
@include common-auth
#auth required pam_shells.so
Alles anzeigen
Die vsftp.log hat den Inhalt:
Tue Jun 14 15:04:23 2016 [pid 22621] CONNECT: Client "xxx.xxx.173.99"
Tue Jun 14 15:04:24 2016 [pid 22620] [mywebsite] OK LOGIN: Client "xxx.xxx.173.99"
Tue Jun 14 15:04:49 2016 [pid 22611] [mywebsite] DEBUG: Client "xxx.xxx.173.99", "Connection terminated without SSL shutdown - buggy client?"
Tue Jun 14 15:05:03 2016 [pid 22618] [mywebsite] DEBUG: Client "xxx.xxx.173.99", "Connection terminated without SSL shutdown - buggy client?"
Tue Jun 14 15:05:24 2016 [pid 22621] [mywebsite] DEBUG: Client "xxx.xxx.173.99", "Connection terminated without SSL shutdown - buggy client?"
Tue Jun 14 15:05:59 2016 [pid 22639] CONNECT: Client "xxx.xxx.173.99"
Tue Jun 14 15:05:59 2016 [pid 22638] [mywebsite] OK LOGIN: Client "xxx.xxx.173.99"
Tue Jun 14 15:06:20 2016 [pid 22642] CONNECT: Client "xxx.xxx.173.99"
Tue Jun 14 15:06:20 2016 [pid 22641] [mywebsite] OK LOGIN: Client "xxx.xxx.173.99"
Tue Jun 14 15:07:00 2016 [pid 22639] [mywebsite] DEBUG: Client "xxx.xxx.173.99", "Connection terminated without SSL shutdown - buggy client?"
Tue Jun 14 15:07:20 2016 [pid 22642] [mywebsite] DEBUG: Client "xxx.xxx.173.99", "Connection terminated without SSL shutdown - buggy client?"
Alles anzeigen
Server ist nginx (Aktuell) - Falls relevant.
Dann habe ich die vsftp.conf mal verändert:
anonymous_enable=NO
local_enable=YES
write_enable=YES
ls_recurse_enable=YES
dirlist_enable=YES
dirmessage_enable=YES
dual_log_enable=YES
xferlog_enable=YES
xferlog_file=/var/log/xferlog
xferlog_std_format=YES
log_ftp_protocol=YES
vsftpd_log_file=/var/log/vsftpd.log
listen=YES
connect_from_port_20=YES
chroot_local_user=YES
#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd/chroot_list
# Passive configuration
pasv_enable=YES
pasv_min_port=60500
pasv_max_port=60500
# Sizing
max_clients=200
max_per_ip=10
idle_session_timeout=600
data_connection_timeout=120
# Options for SSL encrypted connections.
ssl_enable=YES
allow_anon_ssl=NO
debug_ssl=YES
force_local_data_ssl=NO
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
pam_service_name=vsftpd
tcp_wrappers=YES
Alles anzeigen
dann kommt in der vsftp.log so zustande:
Tue Jun 14 15:20:19 2016 [pid 22726] CONNECT: Client "xxx.xx.xx3.99"
Tue Jun 14 15:20:19 2016 [pid 22726] FTP response: Client "xxx.xx.xx3.99", "220 (vsFTPd 3.0.2)"
Tue Jun 14 15:20:19 2016 [pid 22726] FTP command: Client "xxx.xx.xx3.99", "AUTH TLS"
Tue Jun 14 15:20:19 2016 [pid 22726] FTP response: Client "xxx.xx.xx3.99", "234 Proceed with negotiation."
Tue Jun 14 15:20:19 2016 [pid 22726] DEBUG: Client "xxx.xx.xx3.99", "SSL version: TLSv1/SSLv3, SSL cipher: AES128-SHA, not reused, no cert"
Tue Jun 14 15:20:19 2016 [pid 22726] FTP command: Client "xxx.xx.xx3.99", "USER mywebsite"
Tue Jun 14 15:20:19 2016 [pid 22726] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "331 Please specify the password."
Tue Jun 14 15:20:19 2016 [pid 22726] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PASS <password>"
Tue Jun 14 15:20:19 2016 [pid 22725] [mywebsite] OK LOGIN: Client "xxx.xx.xx3.99"
Tue Jun 14 15:20:19 2016 [pid 22727] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "230 Login successful."
Tue Jun 14 15:20:19 2016 [pid 22727] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PBSZ 0"
Tue Jun 14 15:20:19 2016 [pid 22727] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "200 PBSZ set to 0."
[...]
Tue Jun 14 15:20:19 2016 [pid 22727] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PASV"
Tue Jun 14 15:20:19 2016 [pid 22727] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "227 Entering Passive Mode (188,68,55,21,236,84)."
Tue Jun 14 15:20:19 2016 [pid 22727] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "LIST"
Tue Jun 14 15:20:49 2016 [pid 22729] CONNECT: Client "xxx.xx.xx3.99"
Tue Jun 14 15:20:49 2016 [pid 22729] FTP response: Client "xxx.xx.xx3.99", "220 (vsFTPd 3.0.2)"
Tue Jun 14 15:20:49 2016 [pid 22729] FTP command: Client "xxx.xx.xx3.99", "AUTH TLS"
Tue Jun 14 15:20:49 2016 [pid 22729] FTP response: Client "xxx.xx.xx3.99", "234 Proceed with negotiation."
Tue Jun 14 15:20:49 2016 [pid 22729] DEBUG: Client "xxx.xx.xx3.99", "SSL version: TLSv1/SSLv3, SSL cipher: AES128-SHA, not reused, no cert"
Tue Jun 14 15:20:49 2016 [pid 22729] FTP command: Client "xxx.xx.xx3.99", "USER mywebsite"
Tue Jun 14 15:20:49 2016 [pid 22729] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "331 Please specify the password."
Tue Jun 14 15:20:49 2016 [pid 22729] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PASS <password>"
Tue Jun 14 15:20:49 2016 [pid 22728] [mywebsite] OK LOGIN: Client "xxx.xx.xx3.99"
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "230 Login successful."
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PBSZ 0"
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "200 PBSZ set to 0."
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PROT P"
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "200 PROT now Private."
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PWD"
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "257 "/""
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "TYPE I"
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP response: Client "xxx.xx.xx3.99", "200 Switching to Binary mode."
Tue Jun 14 15:20:49 2016 [pid 22730] [mywebsite] FTP command: Client "xxx.xx.xx3.99", "PASV"
Alles anzeigen
Filezilla spuckt dann das aus:
Status: Verbinde mit xxx.xx.55.21:21...
Status: Verbindung hergestellt, warte auf Willkommensnachricht...
Antwort: 220 (vsFTPd 3.0.2)
Befehl: AUTH TLS
Antwort: 234 Proceed with negotiation.
Status: Initialisiere TLS...
Status: Überprüfe Zertifikat...
Status: TLS-Verbindung hergestellt.
Befehl: USER mywebsite
Antwort: 331 Please specify the password.
Befehl: PASS ********************
Antwort: 230 Login successful.
Status: Der Server unterstützt keine Nicht-ASCII-Zeichen.
Befehl: PBSZ 0
Antwort: 200 PBSZ set to 0.
Befehl: PROT P
Antwort: 200 PROT now Private.
Status: Angemeldet
Status: Empfange Verzeichnisinhalt...
Befehl: PWD
Antwort: 257 "/"
Befehl: TYPE I
Antwort: 200 Switching to Binary mode.
Befehl: PASV
Antwort: 227 Entering Passive Mode (xxx,xx,55,21,236,84).
Befehl: LIST
Fehler: Die Datenverbindung konnte nicht hergestellt werden: ETIMEDOUT - Zeitüberschreitung bei Verbindungsversuch
Fehler: Zeitüberschreitung der Verbindung nach 30 Sekunden Inaktivität
Fehler: Verzeichnisinhalt konnte nicht empfangen werden
Status: Verbindung zum Server getrennt
[...]
Antwort: 200 Switching to Binary mode.
Befehl: PASV
Fehler: GnuTLS-Fehler -15: An unexpected TLS packet was received.
Fehler: Verbindung zum Server getrennt: ECONNABORTED - Verbindung abgebrochen
Fehler: Verzeichnisinhalt konnte nicht empfangen werden
Alles anzeigen
Was ich möchte ist:
Der FTP USER soll per filezilla schreiben und lesen können, sow ie der www-data user, also der Webserver.
Ich hoffe, dass mit jemand behilflich sein kann 