# Squid and log permission problem [Solved]

## gouranga

```
root@genserv squid # squid -N

WARNING: Cannot write log file: /var/log/squid/cache.log

/var/log/squid/cache.log: Permission denied

         messages will be sent to 'stderr'.

2006/02/26 23:40:07| WARNING: Closing open FD    2

2006/02/26 23:40:07| Starting Squid Cache version 2.5.STABLE12 for i686-pc-linux-gnu...

2006/02/26 23:40:07| Process ID 24697

2006/02/26 23:40:07| With 1024 file descriptors available

2006/02/26 23:40:07| Performing DNS Tests...

2006/02/26 23:40:07| Successful DNS name lookup tests...

2006/02/26 23:40:07| DNS Socket created at 0.0.0.0, port 32858, FD 3

2006/02/26 23:40:07| Adding nameserver 62.235.14.4 from /etc/resolv.conf

2006/02/26 23:40:07| Adding nameserver 62.235.13.199 from /etc/resolv.conf

2006/02/26 23:40:07| User-Agent logging is disabled.

2006/02/26 23:40:07| Referer logging is disabled.

FATAL: Cannot open '/var/log/squid/access.log' for writing.

        The parent directory must be writeable by the

        user 'squid', which is the cache_effective_user

        set in squid.conf.

Squid Cache (Version 2.5.STABLE12): Terminated abnormally.

CPU Usage: 0.008 seconds = 0.007 user + 0.001 sys

Maximum Resident Size: 0 KB

Page faults with physical i/o: 0

Aborted
```

It doens't matter if the dir exists or not ,always the same error.

I have basicly nothing changed in squid.confLast edited by gouranga on Mon Feb 27, 2006 12:32 pm; edited 1 time in total

----------

## TheRAt

Does the directory /var/log/squid exist, and if so, is it writable by the squid user?

```
ls -l /var/log

...

drwxr-xr-x  2 squid   squid        4096 Feb 25 04:36 squid

...
```

----------

## gouranga

Yes it does

```

root@genserv log # ls -la

..

drwxr-xr-x   2 squid   squid         48 Feb 26 23:52 squid

..

```

```
root@genserv log # ls -la squid/

total 1

drwxr-xr-x   2 squid squid   80 Feb 27 00:45 .

drwxr-x---  25 root  root  1224 Feb 26 23:52 ..

-rwxr-xr-x   1 squid squid    0 Feb 27 00:45 access.log
```

----------

## think4urs11

 *gouranga wrote:*   

> 
> 
> ```
> root@genserv log # ls -la squid/
> 
> ...

 

```
chmod a+x /var/log
```

----------

## gouranga

```
chmod a+x /var/log
```

That did the trick.

Thx a lot.

Squid is up and running.

----------

