permissions problem while reading log file

Sean Crosby richardnixonshead at gmail.com
Wed Jan 16 22:20:33 UTC 2013


On 17 January 2013 07:15, Abhishek Dixit <abhidixit87 at gmail.com> wrote:

> I want to read a log file to see if squid-deb-proxy server is running or
> not  so I do
> tail: cannot open `squid-deb-proxy/access.log' for reading: Permission
> denied
>
>   tail -f squid-deb-proxy/access.log
> hence
>
> I am tried to change permissions of a folder temporarily whose initial
> permissions are
>
> user at ubuntu:/var/log$ ls -l squid*
> squid3:
> total 4
> -rw-r----- 1 proxy proxy    0 Jan 16 14:43 access.log
> -rw-r----- 1 proxy proxy 1359 Jan 16 14:43 cache.log
> ls: cannot open directory squid-deb-proxy: Permission denied
>
> to some thing following
>
> user at ubuntu:/var/log$ sudo chmod -R 644 squid*
>
> This is going to set the directory permissions to 644 as well, meaning you
won't be able to enter them (hence the permission denied). Instead, do this

sudo chmod 755 /var/log/squid3
sudo find /var/log/squid3 -type d -exec chmod 755 {} \;
sudo find /var/log/squid3 ! -type d -exec chmod 644 {} \;

That will set the permissions to 644 for files, and 755 for directories, in
the /var/log/squid3 directory

Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130117/3e10b72c/attachment.html>


More information about the ubuntu-users mailing list