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

captainproton

Member
Aug 18, 2021
10
1
8
62
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.