<div dir="ltr"><div><div><div><br></div><div>In the adduser command --disabled-login and --disabled password options are not there in my system. Got this:<br></div><br>root@t4240qds:~# adduser --system --no-create-home \<br>> --disabled-login --disabled-password \<br>> --ingroup squid squid<br>adduser: unrecognized option '--disabled-login'<br>Tinylogin v1.4 (2015.01.19-06:01+0000) multi-call binary<br><br>Usage: adduser [OPTIONS] <user_name><br><br></div>And the ouput of ls commands are:<br>root@t4240qds:~# ls -la /var<br>total 44<br>drwxr-xr-x 12 root root    4096 Feb 11 08:34 .<br>drwxr-xr-x 17 root root    4096 Feb 11 09:28 ..<br>drwx------  2 root nogroup 4096 Feb 11 08:34 backups<br>drwxr-xr-x  4 root root    4096 Feb 11 08:34 cache<br>drwx------  2 root nogroup 4096 Feb 11 08:34 krb5kdc<br>drwx------  7 root nogroup 4096 Feb 11 09:28 lib<br>drwx------  2 root nogroup 4096 Feb 11 08:34 local<br>lrwxrwxrwx  1 root nogroup   13 Feb 11 08:34 lock -> volatile/lock<br>lrwxrwxrwx  1 root nogroup   12 Feb 11 08:34 log -> volatile/log<br>drwxrwxr-x  2 root root    4096 Feb 13 11:49 logs<br>drwx------  2 root nogroup 4096 Feb 11 08:34 openldap-data<br>drwx------  2 root nogroup 4096 Feb 11 08:34 racoon<br>lrwxrwxrwx  1 root nogroup   12 Feb 11 08:34 run -> volatile/run<br>drwx------  3 root nogroup 4096 Feb 11 08:34 spool<br>lrwxrwxrwx  1 root nogroup   12 Feb 11 08:34 tmp -> volatile/tmp<br>drwxrwxrwt  6 root root     120 Feb 14 05:41 volatile<br>root@t4240qds:~# ls -la /var/logs<br>total 96<br>drwxrwxr-x  2 root root     4096 Feb 13 11:49 .<br>drwxr-xr-x 12 root root     4096 Feb 11 08:34 ..<br>-rw-r-----  1 root nogroup 82104 Feb 13 12:40 cache.log<br><br></div>I had also set the permission of '/usr ' to nobody. I can reboot my system with the default permissions if I have screwd up my system way too much. If I try running squid again it would show ' WARNING: Cannot write log file: /var/logs/cache.log /var/logs/cache.log: Permission denied  messages will be sent to 'stderr'. '. <br><br><br><br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 14, 2015 at 2:48 AM, Amos Jeffries <span dir="ltr"><<a href="mailto:squid3@treenet.co.nz" target="_blank">squid3@treenet.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 14/02/2015 12:45 a.m., Priya Agarwal wrote:<br>
> root@t4240qds:~# chown -R nobody:nogroup /var/logs<br>
<br>
<br>
</span>STOP!!!<br>
<br>
<br>
You are demonstrating in the last few posts that you do not understand<br>
how the command line tools or the permissions work.<br>
<br>
Please stop right now from doing anything on your own. This may take a<br>
while to get your system working again, but it is still possible.<br>
<br>
If you have anyone who has a lot of experience with the OS you are using<br>
and the command line in particualr please get them to check over the<br>
permissions in your entire /var directory structure.<br>
<br>
<br>
We can help guide you through what needs to be done for Squid, but only<br>
if you follow the advice exactly as given and not take other steps.<br>
<span class=""><br>
<br>
<br>
> WARNING: Cannot write log file: /var/logs/cache.log<br>
> /var/logs/cache.log: Permission denied<br>
>          messages will be sent to 'stderr'.<br>
> root@t4240qds:~# ls -ld /var/logs<br>
> drwx------ 2 nobody nogroup 4096 Feb 13 11:49 /var/logs<br>
><br>
<br>
</span>What that means is that the permissions have gotten all screwed up.<br>
<br>
As Anthony mentioned your setting of them on /var/ screwed the entire<br>
operating system from being able to write content in the /var directory<br>
and subdirectories.<br>
<br>
<br>
The top /var directory is always owned by root and group with full read<br>
and execute permissions.<br>
<br>
  chown root:root /var<br>
  chmod 755 /var<br>
<br>
  chown root:root /var/logs /var/cache /var/run<br>
  chmod 755 /var/cache<br>
  chmod 775 /var/logs<br>
<br>
<br>
Your proxy is built with the default username of "squid". So there<br>
should be a system user and group by that name<br>
<br>
  addgroup --system squid<br>
  adduser --system --no-create-home \<br>
      --disabled-login --disabled-password \<br>
      --ingroup squid squid<br>
<br>
If the add* commands complain about existing user/group that is okay.<br>
<br>
<br>
then show us the output of:<br>
  ls -la /var<br>
  ls -la /var/logs<br>
<span class=""><br>
<br>
><br>
> On Fri, Feb 13, 2015 at 5:12 PM, Priya Agarwal wrote:<br>
><br>
>> Then It is unable to write cache.log:<br>
>> Here is the output:<br>
>><br>
>> root@t4240qds:~# /usr/sbin/squid -k parse<br>
>> 2015/02/13 12:27:14| Startup: Initializing Authentication Schemes ...<br>
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'basic'<br>
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'digest'<br>
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'negotiate'<br>
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'ntlm'<br>
>> 2015/02/13 12:27:14| Startup: Initialized Authentication.<br>
>> 2015/02/13 12:27:14| Processing Configuration File: /etc/squid.conf (depth<br>
>> 0)<br>
>> 2015/02/13 12:27:14| Processing: cache_mgr <a href="mailto:priyaiitmandi@gmail.com">priyaiitmandi@gmail.com</a><br>
>> 2015/02/13 12:27:14| Processing: visible_hostname t4240qds<br>
>> 2015/02/13 12:27:14| Processing: cache_effective_user nobody<br>
<br>
<br>
</span>There is no need for that directive in your squid.conf file.<br>
<br>
Your Squid is explicitly built with username "squid".<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Amos<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
<a href="http://lists.squid-cache.org/listinfo/squid-users" target="_blank">http://lists.squid-cache.org/listinfo/squid-users</a><br>
</div></div></blockquote></div><br></div>