<br><br><div class="gmail_quote">On 17 January 2013 07:15, Abhishek Dixit <span dir="ltr"><<a href="mailto:abhidixit87@gmail.com" target="_blank">abhidixit87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span style="background-color:rgb(247,247,247)"><p style="color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:17px;margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

I want to read a log file to see if squid-deb-proxy server is running or not  so I do </p></span><span style="color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;font-size:14px;line-height:17px;background-color:rgb(247,247,247)">tail: cannot open `squid-deb-proxy/access.log' for reading: Permission denied</span><span style="background-color:rgb(247,247,247)"><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

</p><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

<font color="#333333" face="'Ubuntu Beta', UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif"><span style="font-size:14px;line-height:17px"> tail -f squid-deb-proxy/access.log </span></font></p>

<div style="color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;font-size:14px;line-height:17px">hence </div><p></p><p style="color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:17px;margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

I am tried to change permissions of a folder temporarily whose initial permissions are</p><pre style="color:rgb(51,51,51);line-height:17px;margin-top:0px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:rgb(224,224,224);overflow-x:auto;overflow-y:auto;width:auto;max-height:600px;font-family:'Ubuntu Mono','Ubuntu Beta Mono A',Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace">
<code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:rgb(224,224,224);font-family:'Ubuntu Mono','Ubuntu Beta Mono A',Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace;color:rgb(34,34,34)">user@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
</code></pre><p style="color:rgb(51,51,51);font-family:'Ubuntu Beta',UbuntuBeta,Ubuntu,'Bitstream Vera Sans','DejaVu Sans',Tahoma,sans-serif;line-height:17px;margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">

to some thing following</p><pre style="color:rgb(51,51,51);line-height:17px;margin-top:0px;margin-right:0px;margin-bottom:10px;margin-left:0px;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:5px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:rgb(224,224,224);overflow-x:auto;overflow-y:auto;width:auto;max-height:600px;font-family:'Ubuntu Mono','Ubuntu Beta Mono A',Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace">
<code style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;font-size:14px;vertical-align:baseline;background-color:rgb(224,224,224);font-family:'Ubuntu Mono','Ubuntu Beta Mono A',Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace;color:rgb(34,34,34)">user@ubuntu:/var/log$ sudo chmod -R 644 squid*</code></pre>
</span></blockquote><div>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</div><div><br></div><div>sudo chmod 755 /var/log/squid3</div>
<div>sudo find /var/log/squid3 -type d -exec chmod 755 {} \;</div><div>sudo find /var/log/squid3 ! -type d -exec chmod 644 {} \;</div><div><br></div><div>That will set the permissions to 644 for files, and 755 for directories, in the /var/log/squid3 directory</div>
<div><br></div><div>Sean</div><div><br></div></div>