You are not logged in.

#1 2006-07-24 16:38:18

multios
Member
Registered: 2006-05-29
Posts: 36

/dev/lp0 permissions

I hope this is the correct group to post this smile

While trying to get my printer/cups working again, I found that every print job was halted with "Permission Denied" on using /dev/lp0.
The permissions were default crw-rw----. I finally (after trying gpasswd -a user lp) tried chmod o+rw and then checked /dev/lp0. It was changed. Stopping and starting cups still didn't allow printing, so I rebooted.
As root, I tried to print with the printer and I would still get ...permission denied! I checked /dev/lp0 and it was back to the default crw-rw----!
I changed it back to crw-rw-rw- and rebooted. I logged in as root and ls -l /dev/lp0 and it crw-rw----. I did the same thing 3 times in a row and every reboot, the permissions went back to crw-rw----.
I am fully updated with the 2.6.17 kernel and using mkinitcpio.
What is doing this? Why aren't the permissions set permanently?

Offline

#2 2006-07-25 15:51:31

soloport
Member
Registered: 2005-03-01
Posts: 442

Re: /dev/lp0 permissions

One of the first things each Windows user needs to learn when moving to a Unix or Linux environment is:  Resist the urge to boot your system to solve everything!  Linux is not like Windows.  You should be able to resolve most issues without a re-boot.

That asside, the mystery of the permissions changing is: It's supose to work that way!  'udev' controls this.  Please read the udev Wiki to learn why / how.

As for the "Permission denied" thing, this is correct behavior.  (i.e. Never replace correct behavior with one's incorrect understanding  tongue )

The formal way to resolve this is to determine ownership of /dev/lp0  What is the group to which /dev/lp0 has been assigned?  (It should be 'printer' or something similar.)  The most likely problem is that your user account does not belong to that group!  Change this!  Add this group to your login account -- along with 'audio' to resolve some sound problems, 'video' to resolve some video issues, etc.

However, since you said you are trying to get CUPS working, why do you care what's going on with /dev/lp0 ?  Please read / follow the CUPS Wiki instructions.

Offline

#3 2006-07-25 17:10:14

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: /dev/lp0 permissions

soloport wrote:

The formal way to resolve this is to determine ownership of /dev/lp0  What is the group to which /dev/lp0 has been assigned?  (It should be 'printer' or something similar.)  The most likely problem is that your user account does not belong to that group!  Change this!

This is the most unlikely reason for the problem. The user NEVER accesses the printer device directly. /dev/lp0 should be owned and writable by the 'lp' group for printing to work. The user daemon has to be a member of 'lp'.

Offline

#4 2006-07-25 22:32:07

kishd
Member
Registered: 2006-06-14
Posts: 401

Re: /dev/lp0 permissions

As root type gpasswd -a your-username                                 lp


---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare

Offline

Board footer

Powered by FluxBB