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