Author Topic: Cleaned usr/local/cwpsvr/logs/access_log and get Access Denied on website  (Read 1498 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Hi,

I was reading a guide on cleaning cwp logs,

cd /root
nano cleanlog.sh

But I got an error: Error opening terminal: unknown
So I decided to clean some of them manually.

Now when I go to my domain I get Access Denied.

Any tips appreciated

Offline
*
Re: Cleaned usr/local/cwpsvr/logs/access_log and get Access Denied on website
« Reply #1 on: December 04, 2022, 05:29:43 AM »
Issue fixed, some how Owner and Group permissions were wrong on files and folders under public_html

Offline
*****
Rather than manually cleaning logs, I suggest truncating them to zero bytes. Safer than recreating things or messing with permissions:
Code: [Select]
[overseer@srv2 ~]$  du -sh /usr/local/cwpsrv/logs/error_log
403M /usr/local/cwpsrv/logs/error_log
[overseer@srv2 ~]$ sudo truncate -s0 /usr/local/cwpsrv/logs/error_log
[overseer@srv2 ~]$  du -sh /usr/local/cwpsrv/logs/error_log
0 /usr/local/cwpsrv/logs/error_log

Offline
*
@overseer thanks again