Web Server-Protokolle werden tatsächlich in /var/www/vhosts/system/example.tld/logs/
gespeichert.
Log-Dateien in /var/www/vhosts/example.tld/logs/
es ist keine Dateien, sondern Hardlinks zu Dateien in /var/www/vhosts/system/example.tld/logs/
. Achten Sie für gleiche Inode-Nummer 261064:
# ls -lia /var/www/vhosts/example.tld/logs/error_log
261064 -rw-r--r--. 2 root root 2432 Jun 8 18:26 /var/www/vhosts/example.tld/logs/error_log
# ls -lia /var/www/vhosts/system/example.tld/logs/error_log
261064 -rw-r--r--. 2 root root 2432 Jun 8 18:26 /var/www/vhosts/system/example.tld/logs/error_log
wenn ich entfernen habe diese Datei habe ich entfernen Hardlink:
# rm /var/www/vhosts/example.tld/logs/error_log
rm: remove regular file `/var/www/vhosts/example.tld/logs/error_log'? y
# ls -lia /var/www/vhosts/system/example.tld/logs/error_log
261064 -rw-r--r--. 1 root root 2432 Jun 8 18:26 /var/www/vhosts/system/example.tld/logs/error_log
Wenn ich habe schaffen es wieder wird hat eigene Inode-Nummer (276777):
# touch /var/www/vhosts/example.tld/logs/error_log
# ls -lia /var/www/vhosts/example.tld/logs/error_log
276777 -rw-r--r--. 1 root root 0 Jun 8 18:33 /var/www/vhosts/example.tld/logs/error_log
So Sie Datei entfernen müssen Sie nur noch zu lösen Problem, das Sie erstellt haben, und hard~~POS=TRUNC erstellen System-Datei in/log:
# rm /var/www/vhosts/example.tld/logs/error_log
# ln /var/www/vhosts/system/example.tld/logs/error_log /var/www/vhosts/example.tld/logs/error_log
# ls -lia /var/www/vhosts/example.tld/logs/error_log
261064 -rw-r--r--. 2 root root 2432 Jun 8 18:33 /var/www/vhosts/example.tld/logs/error_log
Ich sagte bereits in der Frage, dass ich bereits die Dateien mit vollen Berechtigungen neu erstellt. Außerdem denke ich, selbst wenn die Datei nicht existiert hätte; Es sollte die Protokolldatei selbst erstellt haben. Und übrigens, ja Server sind bereits neu gestartet. – Turab