Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС для молодых и начинающих системных администраторов.
Здравствуйте!
Наступил тут на грабли, на сервере установлена Ubuntu 14-04 sever и CUPS 1.7.2
Через web интерфейс доступ к cups есть, но недоступен раздел Администрирование (ip_addr:631/admin), пишет Forbidden
Вот кусок cupsd.conf
# Only listen for connections from the local machine.
Listen 192.168.0.202:631
Listen localhost:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing On
BrowseLocalProtocols dnssd
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Web interface setting...
WebInterface Yes
# Restrict access to the server...
<Location />
Order allow,deny
Allow all
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
Allow all
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
Allow all
</Location>
Хм, возможно я поторопился с ответом. Посмотрел — у меня сам раздел «Администрирование» открывается без аутентификации, она требуется только когда пытаешься поменять настройки.
Что интересного в /var/log/cups/error_log?
Хм, возможно я поторопился с ответом. Посмотрел — у меня сам раздел «Администрирование» открывается без аутентификации, она требуется только когда пытаешься поменять настройки.
Что интересного в /var/log/cups/error_log?
# tail -n50 error_log
D [29/Oct/2015:18:24:09 +0300] [Client 15] HTTP_STATE_WAITING Closing on EOF
D [29/Oct/2015:18:24:09 +0300] [Client 15] Closing connection.
D [29/Oct/2015:18:24:09 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [29/Oct/2015:18:24:09 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:24:10 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:37:10 +0300] [Client 15] Accepted from localhost (Domain)
D [29/Oct/2015:18:37:10 +0300] [Client 15] Waiting for request.
D [29/Oct/2015:18:37:10 +0300] Report: clients=1
D [29/Oct/2015:18:37:10 +0300] Report: jobs=0
D [29/Oct/2015:18:37:10 +0300] Report: jobs-active=0
D [29/Oct/2015:18:37:10 +0300] Report: printers=0
D [29/Oct/2015:18:37:10 +0300] Report: stringpool-string-count=218
D [29/Oct/2015:18:37:10 +0300] Report: stringpool-alloc-bytes=2856
D [29/Oct/2015:18:37:10 +0300] Report: stringpool-total-bytes=3176
D [29/Oct/2015:18:37:10 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:37:10 +0300] [Client 15] POST / HTTP/1.1
D [29/Oct/2015:18:37:10 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [29/Oct/2015:18:37:10 +0300] [Client 15] No authentication data provided.
D [29/Oct/2015:18:37:10 +0300] [Client 15] 2.0 CUPS-Get-Printers 1
D [29/Oct/2015:18:37:10 +0300] CUPS-Get-Printers
D [29/Oct/2015:18:37:10 +0300] CUPS-Get-Printers client-error-not-found: No destinations added.
D [29/Oct/2015:18:37:10 +0300] [Client 15] Returning IPP client-error-not-found for CUPS-Get-Printers (no URI) from localhost
D [29/Oct/2015:18:37:10 +0300] [Client 15] Content-Length: 116
D [29/Oct/2015:18:37:10 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:37:10 +0300] [Client 15] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=116, response=0xb7b08438(IPP_IDLE), pipe_pid=0, file=-1
D [29/Oct/2015:18:37:10 +0300] [Client 15] Writing IPP response, ipp_state=DATA, old wused=0, new wused=0
D [29/Oct/2015:18:37:10 +0300] [Client 15] bytes=0, http_state=0, data_remaining=0
D [29/Oct/2015:18:37:10 +0300] [Client 15] Waiting for request.
D [29/Oct/2015:18:37:10 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [29/Oct/2015:18:37:10 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:37:10 +0300] [Client 15] POST / HTTP/1.1
D [29/Oct/2015:18:37:10 +0300] cupsdSetBusyState: newbusy="Active clients", busy="Not busy"
D [29/Oct/2015:18:37:10 +0300] [Client 15] No authentication data provided.
D [29/Oct/2015:18:37:10 +0300] [Client 15] 2.0 CUPS-Get-Classes 1
D [29/Oct/2015:18:37:10 +0300] CUPS-Get-Classes
D [29/Oct/2015:18:37:10 +0300] CUPS-Get-Classes client-error-not-found: No destinations added.
D [29/Oct/2015:18:37:10 +0300] [Client 15] Returning IPP client-error-not-found for CUPS-Get-Classes (no URI) from localhost
D [29/Oct/2015:18:37:10 +0300] [Client 15] Content-Length: 116
D [29/Oct/2015:18:37:10 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:37:10 +0300] [Client 15] cupsdWriteClient error=0, used=0, state=HTTP_STATE_POST_SEND, data_encoding=HTTP_ENCODING_LENGTH, data_remaining=116, response=0xb7b08688(IPP_IDLE), pipe_pid=0, file=-1
D [29/Oct/2015:18:37:10 +0300] [Client 15] Writing IPP response, ipp_state=DATA, old wused=0, new wused=0
D [29/Oct/2015:18:37:10 +0300] [Client 15] bytes=0, http_state=0, data_remaining=0
D [29/Oct/2015:18:37:10 +0300] [Client 15] Waiting for request.
D [29/Oct/2015:18:37:10 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Active clients"
D [29/Oct/2015:18:37:10 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:37:10 +0300] [Client 15] HTTP_STATE_WAITING Closing on EOF
D [29/Oct/2015:18:37:10 +0300] [Client 15] Closing connection.
D [29/Oct/2015:18:37:10 +0300] cupsdSetBusyState: newbusy="Not busy", busy="Not busy"
D [29/Oct/2015:18:37:10 +0300] cupsd is not idle any more, canceling shutdown.
D [29/Oct/2015:18:37:11 +0300] cupsd is not idle any more, canceling shutdown.
При попытке обращения в этот лог ничего не добавляется, как и в access_log
Да, именно так Уже весь мозг сломал.
Нет, прокси там нету
Возможно, в web сервисе разрешено только с localhost. Обычная практика.
Простите, вы о чем и где посмотреть
P.S. дело явно не в конфиге, скормил конфиг со своей тачки (где все работает), результат тот же
Пока ubuntu плавно обновлялась, все было ок, стоило поставить систему с 0 как началось
Всем спасибо
Проблема решена. Видимо CUPS встал криво (был выбран как компонент в момент установки системы)
Полное удаление (apt-get purge cups) и переустановка. Далее cups.conf был приведен к тому виду, как в начале темы и все заработало.