[SOLVED] Something odd happened after deleting log files - pmg 6.4-4

captainproton

Member
Aug 18, 2021
10
1
8
61
I wanted to clear a couple of log files out of /var/log and accidently removed all log files due to a typing error. I thought I was removing some files in a directory using "rm -fr foldername" but removed all logs and all folders within /var/log/

When I realised what I had done I shutdown and restarted, hoping the logs would be recreated. Some logs were created automatically but when I tried to access the GUI interface via my browser the connection timed out with no responce.

By removing the logs I was unable to get back into the Web Interface :(

Thankfully I had made a full backup only a few hours earlier so after restoring the backup everything was ok.

It isn't a big issue for me, but I do think it's an oddity.
 
hi,

when you rm -fr'd in /var/log, you've deleted the pmgproxy directory -- that's why the gui stopped working

try the following:
Code:
mkdir /var/log/pmgproxy
chown -R www-data /var/log/pmgproxy

the error can be seen in the journalctl:
Code:
journalctl -f
...
unable to open log file '/var/log/pmgproxy/pmgproxy.log' - No such file or directory
unable to open log file '/var/log/pmgproxy/pmgproxy.log' - Permission denied
 
Last edited:
hi,

when you rm -fr'd in /var/log, you've deleted the pmgproxy directory -- that's why the gui stopped working

try the following:
Code:
mkdir /var/log/pmgproxy
chown -R www-data /var/log/pmgproxy

the error can be seen in the journalctl:
Code:
journalctl -f
...
unable to open log file '/var/log/pmgproxy/pmgproxy.log' - No such file or directory
unable to open log file '/var/log/pmgproxy/pmgproxy.log' - Permission denied

Thanks, now I know which folder caused the malfunction. Actually it was me who caused it :) At the time I thought I had previously changed into a folder below /var/log.

I restored my backup and was happy to move on. I just thought it was odd that a missing log file / folder could bring it down. Even pmgreport produced no output.

Thanks.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!