# access.log squid empty after re-create



## Bill James (Mar 27, 2017)

HelloFolks,

Need your advice about my problem. I remove my access.log squid because it's huge capacity. Then I re-create it using touch command under: /var/log/squid/access.log and give owner/permission: squid/ 777 for this new access.log

Then the problem is while I access any connection to internet via squid there is no log in access.log
I also use command: squid -k rotate, it duplicate access.log.0 but the problem still same (there is no log)

What I miss in this problem? Hope you can help me.
Thanks for your advice..

Here my capture under: /var/log/squid

```
root@Cornwallis:~ # ls -la /var/log/squid/
total 1164
drwxr-x---  2 squid  squid     512 Mar 27 23:42 .
drwxr-xr-x  4 root   wheel    1536 Mar 25 08:00 ..
-rw-r-----  1 squid  squid       0 Mar 27 23:42 access.log
-rwxrwxrwx  1 squid  squid       0 Mar 27 23:20 access.log.0
-rw-r-----  1 squid  squid     553 Mar 27 23:42 cache.log
-rw-r-----  1 squid  squid     673 Mar 27 23:42 cache.log.0
-rw-r-----  1 squid  squid   13722 Mar 27 23:11 cache.log.1
-rw-r-----  1 squid  squid    5231 Mar 25 12:33 cache.log.2
-rw-r-----  1 squid  squid     711 Mar 25 12:13 cache.log.3
-rw-r-----  1 squid  squid  511001 Mar 25 12:13 cache.log.4
-rw-r-----  1 squid  squid  533405 Mar 22 21:56 netdb.state
```


----------



## SirDice (Mar 27, 2017)

Reload Squid. The old file is still opened.


----------



## Bill James (Mar 27, 2017)

I have been restart my squid before after re-create access.log but the log sill not raise.
As your advice then i restart again and browsing some internet connection. Still facing same problem.

```
root@Cornwallis:~ # /usr/local/etc/rc.d/squid restart
Performing sanity check on squid configuration.
Configuration for squid passes.
Performing sanity check on squid configuration.
Configuration for squid passes.
Stopping squid.
Waiting for PIDS: 940.
Starting squid.
root@Cornwallis:~ # tail -f /var/log/squid/access.log
^C
root@Cornwallis:~ # ls -la /var/log/squid/
total 1168
drwxr-x---  2 squid  squid     512 Mar 27 23:42 .
drwxr-xr-x  4 root   wheel    1536 Mar 25 08:00 ..
-rw-r-----  1 squid  squid       0 Mar 27 23:42 access.log
-rwxrwxrwx  1 squid  squid       0 Mar 27 23:20 access.log.0
-rw-r-----  1 squid  squid    4912 Mar 27 23:47 cache.log
-rw-r-----  1 squid  squid     710 Mar 27 23:42 cache.log.0
-rw-r-----  1 squid  squid   13722 Mar 27 23:11 cache.log.1
-rw-r-----  1 squid  squid    5231 Mar 25 12:33 cache.log.2
-rw-r-----  1 squid  squid     711 Mar 25 12:13 cache.log.3
-rw-r-----  1 squid  squid  511001 Mar 25 12:13 cache.log.4
-rw-r-----  1 squid  squid  533405 Mar 22 21:56 netdb.state
```


----------



## SirDice (Mar 28, 2017)

Try this:

Stop Squid; `service squid stop` Make sure _all_ Squid processes are gone.
Remove file; `rm /var/log/squid/access.log`
Start squid; `service squid start`


----------



## Bill James (Mar 29, 2017)

Thanks Sir Dice. It's work. The problem is access.log still exist even I remove it. Then I remove it once again and start squid.
access log back to catch our log history.
Thanks for your advice...


----------

