Control Web Panel

WebPanel => CentOS 7 Problems => Topic started by: emar on December 04, 2022, 01:06:27 AM

Title: Cleaned usr/local/cwpsvr/logs/access_log and get Access Denied on website
Post by: emar on December 04, 2022, 01:06:27 AM
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
Title: Re: Cleaned usr/local/cwpsvr/logs/access_log and get Access Denied on website
Post by: emar 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
Title: Re: Cleaned usr/local/cwpsvr/logs/access_log and get Access Denied on website
Post by: overseer on January 08, 2023, 07:02:08 AM
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
Title: Re: Cleaned usr/local/cwpsvr/logs/access_log and get Access Denied on website
Post by: emar on January 09, 2023, 04:21:20 AM
@overseer thanks again