• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

ftp Uhrzeit und SuSE Zeit um 1h verschoben

panapaul

Newbie
Hallo!

Ich habe bei meinem SuSE 10.0 - Server GMT eingestellt. Verbinde ich mich über FTP auf den Server, werden alle Zeitangaben eine Stunde eher angezeigt (z.B. Erstellzeit einer Datei). Das ist schon interessant, ein Terminal mit ssh zeigt mir die richtige Zeit und eine FTP-Verbindung zeigt mir eine falsche Zeit. Ich habe verschiedene FTP-Clients versucht, auch verschiedene OS. Immer das gleiche. Es scheint eine Einstellung am FTP-Serverdaemon zu sein. Aber welche soll es sein???? Vielleicht hat einer eine Idee. Achso, umstellen auf Ortszeit hat nichts gebracht!!!
 

whois

Ultimate Guru
Hi

Die GMT Zeit hat immer abweichungen von einer bzw. 2 Stunden.

Sieh dir bitte den Link an.

http://wwp.greenwichmeantime.com/
 
OP
P

panapaul

Newbie
Ja, aber das erklärt nicht die unterschiedlichen Anzeigen...Wenn ich mich per FTP auf den SuSE-Server verbinde, sehe ich als Erstellzeit einer Datei 13:22 Uhr. Verbinde ich mich aber mit einer SSH auf den Server, sehe ich als Erstellzeit dieser Datei 14:22. Und das kann ich von beliebigen Clients (Windows/Linux) versuchen und es ist immer das gleiche. Bin ich richtig physikalisch an der Konsole des Servers, sehe ich als Erstellzeit auch 14:22 Uhr. Das ist eigentlich, was mich so verblüfft. Und ich habe keine Erklärung dafür.
 
Moin Moin,
ich hatte auf meinem Webserver ebenfalls das Problem der Zeitverschiebung. Wenn man über FTP seine Seiten aktualisiert ist das nervig. Ich benutze als FTP-Server seit eh und je den Proftpd. Dort hat man die Möglichkeit in der /etc/proftpd.conf mit der Zeile "TimesGMT off" die Zeitgeschichte in den Griff zu bekommen. Bei mir stimmt der angezeigte Zeitstempel über ftp, sowohl über ssh damit überein.
Andere FTP-Server wie VSFTP haben bestimmt auch eine gleichwertige Einstelloption.
 

Waldgeist

Newbie
ich habe das gleiche Problem. Nur das es bei mir derzeit 2 Stunden zurück sind. Vermutlich auch durch die Zeitverschiebung.

Aber das muss doch auch irgend wie anders lösbar sein als über das FTP Programm oder?

Auf dem Server ist die Zeit korrekt eingestellt.
Aber wie gesagt halt im FTP und auch im WinSCP3 (direkter Zugriff auf den Server) ist die Zeit falsch...

Wäre super wenn jemand rat wüsste.

Vielen Dank.

MfG Waldgeist
 

panamajo

Guru
Code:
jo@l33t ~> touch foo
jo@l33t ~> l foo
-rw-r--r-- 1 jo foyazee 0 Aug 20 17:07 foo
jo@l33t ~> export TZ="GMT"
jo@l33t ~> l foo
-rw-r--r-- 1 jo foyazee 0 Aug 20 15:07 foo
jo@l33t ~> export TZ="CET"
jo@l33t ~> l foo
-rw-r--r-- 1 jo foyazee 0 Aug 20 17:07 foo
jo@l33t ~> export TZ="UTC"
jo@l33t ~> l foo
-rw-r--r-- 1 jo foyazee 0 Aug 20 15:07 foo

Wie man sieht beeinflusst die Variable TZ die Datumsdarstellung (nicht aber das Datum das im FS vermerkt wird).

Der Unterschied zwischen (s)ftp und ssh:
Bei ersteren findet kein Login statt, weder TZ noch locales sind belegt, also erfolgt die Ausgabe der Uhrzeit wie sie die Gegenseite liefert (und wenn das ein Server ist wird der vmtl. UTC verwenden.

Bei einer ssh Session findet ein Login statt, deshalb die andere Darstellung (und ggf. auch Werte) der Uhrzeit.
 

cero

Guru
Habt ihr in der vsftpd.conf (VsFTP) auch
Code:
use_localtime=YES
gesetzt? Damit sollte die Uhrzeit vom FTP-Server mit der des Systems übereinstimmen.
 

Waldgeist

Newbie
also die Antwort kam echt schnell. Danke dafür.
Aber sagen tut sie mir nichts...
Ich bin noch dabei das Linux-System besser zu verstehen.
Aber im Moment brauche ich immer noch etwas dateibezogenere Hinweise. :roll:

Danke.
 

Waldgeist

Newbie
@ cero: Hmm da waren wir wohl gleich schnell.
Mit deiner Antwort kann ich auf jeden Fall wesentlich mehr anfangen.
Ich habe die Datei vsftpd.conf mal geöffnet und nach dem Eintrag

use_localtime

gesucht. Dieser ist in der Datei aber scheinbar nicht vorhanden.

Soll ich diesen einfach mal anlegen und das ganze dann versuchen?
 

Waldgeist

Newbie
hmm habe ich gemacht...
Jetzt kann ich mich nicht mehr einloggen.
Ich habe den Eintrag wieder entfernt.
Aber einloggen kann ich mich trotzdem nicht.

FTP habe ich neu gestartet mit
- ftp stop
- ftp start
Besser gesagt das habe ich über die Verwaltungssoftware gemacht.
[Hmm die Verwaltungssoftware muss irgend einen anderen Codeschnipsel benutzt haben. Über die Konsole funktioniert es so wie oben (ftp stop) auf jeden Fall nicht.]

Auch nach dem Entfernen des Eintrages habe ich nochmals neu gestartet.
Aber auch das geht nicht.
 

cero

Guru
Benutzt du SuSE? Wie startest du den vsftpd denn? Als Standalone oder
über xinetd?
Wenn über xinetd, dann wird er so neu gestartet: Als root auf der Konsole:
Code:
rcxinetd restart

Der Unterschied ist hier beschrieben:
http://strcat.neessen.net/eigenes/vsftp.html#start
 

Waldgeist

Newbie
Ich nutze Suse (9.3).
Wie startest du den vsftpd denn? Als Standalone oder über xinetd?
Bitte was? [habe ebend erst deinen Link gesehen, lese den schnell und poste dann hier in diesem Post nochmal nach]

Der Code hat auf jeden Fall funktioniert.
Shutting down xinetd: done
Starting INET services. (xinetd) done

Aber mit dem gleichen Erfolg.
Einloggen kann ich mich noch immer nicht.
 

Waldgeist

Newbie
Also das was ich jetzt zum Start von vsftpd gelesen habe sagt mir auch nicht wirklich was. Ich habe den FTP-Dienst bisher noch nie gestartet oder gestoppt.

Hier die vsftpd.conf:

Code:
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are very paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
#
# If you dont change anything here you will have a minimum setup for an
# anonymus FTP server.

# General Settings
#
# Uncomment this to enable any form of FTP write command.
#
write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
#
dirmessage_enable=YES
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#
#nopriv_user=ftpsecure
#
# You may fully customise the login banner string:
#
ftpd_banner="FTP-server."
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#
#ls_recurse_enable=YES
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#
#deny_email_enable=YES
#
# (default follows)
#
#banned_email_file=/etc/vsftpd.banned_emails
#
# If  enabled,  all  user  and  group  information in
# directory listings will be displayed as "ftp".
#
#hide_ids=YES

# Local FTP user Settings
#
# Uncomment this to allow local users to log in.
#
local_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#
local_umask=072
#
# Uncomment to put local users in a chroot() jail in their home directory
# after login.
#
chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#
#chroot_list_enable=YES
#
# (default follows)
#
#chroot_list_file=/etc/vsftpd.chroot_list
#
# The maximum data transfer rate permitted, in bytes per second, for
# local authenticated users. The default is 0 (unlimited).
#
#local_max_rate=7200


# Anonymus FTP user Settings
#
# Allow anonymous FTP?
#
anonymous_enable=NO
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#
#anon_upload_enable=YES
#
# Default umask for anonymus users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#
#anon_umask=022
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#
#anon_mkdir_write_enable=YES
#
# Uncomment this to enable anonymus FTP users to perform other write operations
# like deletion and renaming.
#
#anon_other_write_enable=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#
#chown_uploads=YES
#chown_username=whoever
#
# The maximum data transfer rate permitted, in bytes per second, for anonymous
# authenticated users. The default is 0 (unlimited).
#
#anon_max_rate=7200


# Log Settings
#
# Activate logging of uploads/downloads.
#
xferlog_enable=YES
#
# You may override where the log file goes if you like. The default is shown
# below.
#
xferlog_file=/var/log/xferlog
#
# If you want, you can have your log file in standard ftpd xferlog format
#
xferlog_std_format=YES
#
# Uncomment this to log all FTP requests and responses. This only works if
# xferlog_std_format is not enabled. Beware, it will create a huge amount of data
# in your logfile.
#
#log_ftp_protocol=YES
#
# Uncomment this to enable session status information in the system process listing.
#
#setproctitle_enable=YES

# Transfer Settings
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
#
#connect_from_port_20=YES
#
# You may change the default value for timing out an idle session.
#
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#
#data_connection_timeout=120
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#
ascii_upload_enable=YES
#ascii_download_enable=YES
#
# Set to NO if you want to disallow the  PASV  method of obtaining a data
# connection.
#
#pasv_enable=NO

# PAM setting. Do NOT change this unless you know what you do!
#
pam_service_name=vsftpd

# Set listen=YES if you want vsftpd to run standalone
#
#listen=YES
 

cero

Guru
Du benutzt xinetd, da die folgenden Zeilen auskommentiert sind:
Code:
# Set listen=YES if you want vsftpd to run standalone
#
#listen=YES

Schau mal unter Yast - Netzwerkdienste - Netzwerkdienste (xinetd) nach, ob der
Server aktiviert ist.

Falls nicht, aktivier ihn mal bitte.
 

Waldgeist

Newbie
Gut zu wissen...

Also es ist aktiviert.

imgqg5.jpg
 

cero

Guru
Jetzt musst du in der Liste nur noch den vsftpd suchen und den Status auf AN setzen.
Bei mir in Screenshot ist der Eintrag blau markiert.
Danach mal bitte testen, ob alles funktioniert.
 

Waldgeist

Newbie
Also erstmal ein fettes Danke, für die Mühe und die Zeit die du hier investierst. Vielen Dank.

Ich habe den Eintrag gesucht. Er ist allerdings auf "AN".
 
Oben