/usr/local/cpanel/logs/access_log deleted by mistake

simpliq

Registered
Nov 11, 2014
1
0
1
cPanel Access Level
Root Administrator
Hello,

I've deleted by mistake the access_log file on my number 1 server.
I noticed on server number 2 that the file has " ASCII text, with very long lines " encoding.
How to fix this ?

Regards,
Razvan Vlaicu
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

You can re-create this log file via:

Code:
touch /usr/local/cpanel/logs/access_log
By default, ownership is set to "root:root" and permissions are set to 0600.

Thank you.
 

sarhosting

Well-Known Member
Oct 1, 2007
170
2
68
United States
cPanel Access Level
Root Administrator
Twitter
Hello :)

You can re-create this log file via:

Code:
touch /usr/local/cpanel/logs/access_log
By default, ownership is set to "root:root" and permissions are set to 0600.

Thank you.
Hi cPanelMichael. Two questions for you.
1. Do you have to restart the cPanel Service once the file is recreated?
2. Is the old information reimported into the log or does it start anew?

Thanks alot.
 

paknode

Registered
Aug 10, 2015
4
0
1
Pakistan
cPanel Access Level
Root Administrator
1. Do you have to restart the cPanel Service once the file is recreated?
No way it doesn't need to restart your server as it just create a file so file creation is not like updating kernel on kvm server.

2. Is the old information reimported into the log or does it start anew?
The log starts with fresh content.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,216
463
Hello :)

Right, you don't have to restart cPanel, and the old data is permanently removed when the file is manually deleted.

Thank you.