nao consigo criar os log do squid da erro [RESOLVIDO]

1. nao consigo criar os log do squid da erro [RESOLVIDO]

Andre chagas ramos
andre_ramos

(usa openSUSE)

Enviado em 17/05/2010 - 11:25h

ao executar o
#squid -z
WARNING: Cannot write log file: /var/log/squid/cache.log
/var/log/squid/cache.log: Permission denied
messages will be sent to 'stderr'.
2010/05/17 11:22:13| Creating Swap Directories
2010/05/17 11:22:13| /var/cache/squid exists
FATAL: Failed to make swap directory /var/cache/squid/00: (13) Permission denied
Squid Cache (Version 3.0.STABLE10): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.008 user + 0.004 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0

da esse erro
oque pode ser


  


2. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

irado furioso com tudo
irado

(usa XUbuntu)

Enviado em 17/05/2010 - 11:52h

o usuário:grupo dêsses diretorios normalmente são squid:squid; verifique, em pelo menos UMA distribuição acabam ficando como root:root e daí.. não dá pra usar.


3. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 17/05/2010 - 11:52h

D permissão d escrita pro squid, coitado!

# chmod -R 775 /var/cache/squid
# chmod -R 775 /var/log/squid
# chown -R squid:squid /var/cache/squid
# chown -R squid:squid /var/log/squid


4. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Andre chagas ramos
andre_ramos

(usa openSUSE)

Enviado em 17/05/2010 - 12:06h

ao executar o chown -R da o seguinte erro

chown -R squid:squid /var/cache/squid
chown: invalid group: `squid:squid'



5. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 17/05/2010 - 12:30h

Troque o squid:squid por proxy:proxy.


6. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Andre chagas ramos
andre_ramos

(usa openSUSE)

Enviado em 17/05/2010 - 12:52h

o mesmo erro

chown -R proxy:proxy /var/cache/squid
chown: invalid user: `proxy:proxy'



7. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 17/05/2010 - 12:55h

Então crie:

# groupadd squid
# useradd -g squid -s /sbin/nologin squid


8. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Andre chagas ramos
andre_ramos

(usa openSUSE)

Enviado em 17/05/2010 - 14:36h

criei os usuarios mas quando executei squid -z
da o seguinte erro:

WARNING: Cannot write log file: /var/log/squid/cache.log
/var/log/squid/cache.log: Permission denied
messages will be sent to 'stderr'.
2010/05/17 14:35:06| Creating Swap Directories
2010/05/17 14:35:06| /var/cache/squid exists
FATAL: Failed to make swap directory /var/cache/squid/00: (13) Permission denied
Squid Cache (Version 3.0.STABLE10): Terminated abnormally.
CPU Usage: 0.020 seconds = 0.004 user + 0.016 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 24

estou testando o squid para autenticar no active diretory do win2003
o meu squid.conf segue abaixo

será que pode ser alguma coisa do squid.conf

script


# WELCOME TO SQUID 3.0.STABLE10
# ----------------------------

################# Autentica��o de Usu�rios ##########################
auth_param basic program /usr/sbin/squid_ldap_auth -R -b "dc=server,dc=toctao" -D "cn=Proxy_User,ou=Internet,dc=server,dc=toctao" -w"123456" -f sAMAccountName=%s -h 192.168.0.201
auth_param basic children 5
auth_param basic realm Digite sua senha
auth_param basic credentialsttl 15 minutes
#auth_param basic casesensitive off

emulate_httpd_log on
mime_table /etc/squid/mime.conf
unlinkd_program /usr/sbin/unlinkd


#####################################################################

acl password proxy_auth REQUIRED
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl redetoctao src 192.168.1.0/24 # RFC1918 possible internal network

##########################################################################
# ACL externa par autentica��o nas bases LDAP do PDC
external_acl_type ldap_group %LOGIN /etc/squid/squid_ldap_group -R -b "dc=server,dc=toctao" -D "cn=Proxy_User,ou=Internet,dc=server,dc=toctao" -w "123456" -f "(&(objectclass=person)(sAMAccountName=%v) memberof=cn=%a,ou=Internet,dc=server.dc=toctao)" -h 192.168.0.201

##################### Regras ########################################
acl Safe_ports port 20 # programa oi
acl SSL_ports port 443 563 9141 # https
acl Safe_ports port 553 # Autenticacao do outlook
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 8021
acl Safe_ports port 2121
acl Safe_ports port 89 # juridico 2ccago
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
##########################################################################
# ACL abaixo efetua bloqueio do MSN
acl dst_msn dstdomain -i "/etc/squid/regras/msn_bloq.txt"

# ACL abaixo relaxam o controle de conteudo das 12:00 as 13:15
acl libera_sites url_regex -i "/etc/squid/regras/libera_almoco.txt"
acl almoco time SMTWHFA 12:00-13:15

# ACL de controle de conteudo
acl dominio_bloqueado dstdomain -i "/etc/squid/regras/bloqueados.txt"
acl dominio_liberado dstdomain -i "/etc/squid/regras/sites_permitidos.txt"

## ACL active diretory
acl ldapAcessoPadrao external ldap_group AcessoPadrao
acl ldapAcessoTotal external ldap_group AcessoTotal

###########################################################################
#http_access allow manager localhost
#http_access deny !Safe_ports
#http_access deny CONNECT !SSL_ports

####################### Permis�es das Regras ########################
http_access allow ldapAcessoTotal
http_access deny dst_msn
http_access allow libera_sites
http_access allow libera_sites almoco
http_access deny dominio_bloqueado
http_access allow ldapAcessoPadrao
http_access deny manager

###################################################################
http_access allow redetoctao
http_access allow localhost
http_access deny all

icp_access allow redetoctao
icp_access deny all

http_access allow redetoctao
http_access deny all

#####################################################################
icp_access allow all
cache_effective_user nobody
cache_effective_group nobody
visible_hostname linux.server.toctao
unique_hostname linux.server.toctao
append_domain .server.toctao
acl local-servers dstdomain server.toctao
always_direct allow local-servers
#always_direct allow local-serverspr

#header_access via deny all
#header_access X-Forwarded-For deny all

#####################################################################


############### Endere�o do Servidor e Porta para Acesso############
http_port 3128
####################################################################

hierarchy_stoplist cgi-bin ?

######################## Tamanhos das Cache ########################
cache_dir ufs /var/cache/squid 2048 128 512
cache_swap_low 90
cache_swap_high 95

########################### Caminhos dos Logs ######################
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
error_directory /usr/share/squid/errors/Portuguese

#######################Controle de Acessos #########################
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
#####################################################################

icp_port 3230
#coredump_dir /var/cache/squid




9. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

ilmar machado barcellos
panzzer

(usa Ubuntu)

Enviado em 17/05/2010 - 14:37h

vixe...


10. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 17/05/2010 - 14:37h

Além d criar o usuário e o grupo, vc tem q modificar o dono, como eu passei anteriormente...


11. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Andre chagas ramos
andre_ramos

(usa openSUSE)

Enviado em 17/05/2010 - 14:44h

pc077:/etc/rc.d # chown -R squid:squid /var/cache/squid
pc077:/etc/rc.d # chown -R squid:squid /var/log/squid
pc077:/etc/rc.d # squid -z
WARNING: Cannot write log file: /var/log/squid/cache.log
/var/log/squid/cache.log: Permission denied
messages will be sent to 'stderr'.
2010/05/17 14:43:35| Creating Swap Directories
2010/05/17 14:43:35| /var/cache/squid exists
FATAL: Failed to make swap directory /var/cache/squid/00: (13) Permission denied
Squid Cache (Version 3.0.STABLE10): Terminated abnormally.
CPU Usage: 0.028 seconds = 0.012 user + 0.016 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 24



12. Re: nao consigo criar os log do squid da erro [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 17/05/2010 - 15:02h

Então tente assim:

# su - squid squid -z

E v se funciona. Se não funcionar, faça:

# chmod -R 777 /var/log/squid
# chmod -R 777 /var/cache/squid

E tente d novo.



01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts