# [SOLVED] cups - localhost:631 - 403 Forbidden

## piotrus-_-pan

Witam,

chcialem podlaczyc sobie drukarke

```
emerge cups
```

```
/etc/init.d/cupsd start
```

cupsd.conf

```
LogLevel info

# Administrator user group...

SystemGroup lpadmin

# Only listen for connections from the local machine.

Listen localhost:631

Listen /var/run/cups/cups.sock

# Show shared printers on the local network.

Browsing On

BrowseOrder allow,deny

BrowseAllow @LOCAL

# Default authentication type, when authentication is required...

DefaultAuthType Basic

# Restrict access to the server...

<Location />

  Order allow,deny

  Allow localhost

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Encryption Required

  Order allow,deny

  Allow localhost

</Location>

# Restrict access to configuration files...

<Location /admin/conf>

  AuthType Basic

  Require user @SYSTEM

  Order allow,deny

  Allow localhost

</Location>

# Set the default printer/job policies...

<Policy default>

  # Job-related operations must be done by the owner or an adminstrator...

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  # All administration operations require an adminstrator to authenticate...

  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>

    AuthType Basic

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>

```

/etc/hosts

```
XX.XX.XX.XX   laptop.gentoo laptop localhost
```

uruchamiam przegladarke z root'a

bede wdzieczny za porade

pozdrawiam

PiotrekLast edited by piotrus-_-pan on Sat Jan 13, 2007 1:35 pm; edited 1 time in total

----------

## argasek

Pozaglądaj co piszczy w /var/log/cups.

----------

## w.tabin

 *piotrus-_-pan wrote:*   

> Witam,
> 
> chcialem podlaczyc sobie drukarke

 

Czytałeś to printing-howto i to printing-howto.

Zainteresuj się jeszcze sterownikiem

```
net-print/hplip
```

zastępującym hpoj i hpijs.

Pozdrawiam  :Very Happy: 

----------

## piotrus-_-pan

dziekuje za odpowiedzi,

w.tabin - robie wedlug tego pierwszego , mam problem z polaczeniem sie z 631 wiec narazie sterownikami sie nie zajmowalem ale jak to przebrne to na pewno mi sie przyda - dziekuje

co do var/log/cups/error_log

```
...

W [09/Jan/2007:23:38:03 +0100] Repairing ownership of "/var/run/cups"

W [09/Jan/2007:23:38:03 +0100] Repairing ownership of "/var/run/cups/certs"

...

E [11/Jan/2007:19:11:49 +0100] Bad URI "//cups.css" in request!

E [11/Jan/2007:19:11:57 +0100] Bad URI "//index.html" in request!

E [11/Jan/2007:19:12:05 +0100] Bad URI "//index.html" in request!

...

E [12/Jan/2007:00:21:55 +0100] Creating missing directory "/etc/cups/ppd"

W [12/Jan/2007:00:21:55 +0100] Repairing ownership of "/etc/cups/ppd"

W [12/Jan/2007:00:21:55 +0100] Repairing access permissions of "/etc/cups/ppd"
```

----------

## Yaro

Trzeba czytać co wypluwa emerge   :Smile:  .

Zmień w /etc/cups/cupsd.conf:

```
Listen localhost:631
```

na

```
Listen *:631
```

----------

## piotrus-_-pan

przekompilowalem jeszcze raz

rzeczywiscie na koncu wypluwa to info

dzieki Yaro

to jest tak jak sie zostawia kompilacje na noc i pozniej poweroff

pozdrawiam i dziekuje

----------

## lsdudi

 *piotrus-_-pan wrote:*   

> 
> 
> to jest tak jak sie zostawia kompilacje na noc i pozniej poweroff
> 
> 

 

na wszystko jest sposób 

ustaw logowanie w portage  :Smile: 

----------

## piotrus-_-pan

moglbys jasniej... lsdudi  :Smile: 

----------

