Mombu the GNU Linux Forum

  Mombu the GNU Linux Forum > GNU_Linux > /dev/lp0 permission problems


User Name
Password
REGISTER NOW! Search Today's Posts Mark Forums Read


Reply
 
Thread Tools Search this Thread Display Modes
1 18th May 16:40
peta
External User
 
Posts: 1
Default /dev/lp0 permission problems



Greetings fellow penguins!

I am having problems getting my printer to work. Same printer worked
fine in mdk2008, however I am having problems in 2008 Spring ONE hd
install with all updates. I go through the setup process in MCC the
printer is _not_ detected. So I point it to /dev/lp0 which worked fine
in 2008. Cups gives me (Default Printer) "Unable to open device file
"/dev/lp0": Permission denied"

================================================== =====
$ ls -l /dev/lp0
crw------- 1 root root 6, 0 2008-05-11 23:57 /dev/lp0

================================================== =====
cupsd.conf


LogLevel info
SystemGroup lpadmin root
Group sys
User lp
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
# Disable printer sharing and shared printers.
Browsing Off
DefaultAuthType Basic
<Location />
# Restrict access to the server...
Order allow,deny
</Location>
<Location /admin>
Encryption Required
# Restrict access to the admin pages...
Order allow,deny
</Location>
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
# Restrict access to the configuration files...
Order allow,deny
</Location>
<Policy default>
<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>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-
Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer 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-Accept-Jobs CUPS-
Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
BrowseInterval 0

================================================== ========

I understand its a permission problem but not how to solve it without
breaking something.

Any advice greatly appreciated.

peta
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


2 18th May 21:27
david w. hodgins
External User
 
Posts: 1
Default /dev/lp0 permission problems



Add the following lines to /etc/modprobe.preload
parport_pc
ppdev
lp
and run "modprobe -v xxx", for each of the above modules. Then try
the printer config in mcc again.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
  Reply With Quote
3 18th May 21:27
peta
External User
 
Posts: 1
Default /dev/lp0 permission problems


Thanks Dave, tried that still get

Unable to open device file "/dev/lp0": Permission denied

in cups, so it must be that cups can not access the /dev/lp0 file. Do I
change the permissions on that file?

Regards peta
  Reply With Quote
4 18th May 21:27
david w. hodgins
External User
 
Posts: 1
Default /dev/lp0 permission problems


I have ...
$ ll /dev/lp0
crw-rw---- 1 lp sys 6, 0 2008-05-10 21:11 /dev/lp0

Check "grep parport /var/log/syslog" after a reboot, to make sure the
parallel port is being handled properly.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
  Reply With Quote
SPONSORED LINKS BY GOOGLE

 


5 19th May 09:58
peta
External User
 
Posts: 1
Default /dev/lp0 permission problems


OK thanks Dave I have,

# ll /dev/lp0
crw------- 1 root root 6, 0 2008-05-13 03:24 /dev/lp0

and,

# grep parport /var/log/syslog
May 11 11:19:49 localhost printerdrake[4721]: running: rmmod parport_pc
May 11 11:19:49 localhost printerdrake[4721]: running: rmmod parport
May 11 11:19:49 localhost printerdrake[4721]: running: /sbin/modprobe
parport_pc
May 11 11:30:21 localhost printerdrake[5581]: running: rmmod parport_pc
May 11 11:30:21 localhost printerdrake[5581]: running: rmmod parport
May 11 11:30:21 localhost printerdrake[5581]: running: /sbin/modprobe
parport_pc
May 11 11:43:11 localhost printerdrake[5994]: running: rmmod parport_pc
May 11 11:43:11 localhost printerdrake[5994]: running: rmmod parport
May 11 11:43:11 localhost printerdrake[5994]: running: /sbin/modprobe
parport_pc
May 11 13:59:22 localhost printerdrake[4275]: running: rmmod parport_pc
May 11 13:59:22 localhost printerdrake[4275]: running: rmmod parport
May 11 13:59:23 localhost printerdrake[4275]: running: /sbin/modprobe
parport_pc
May 11 14:10:20 localhost printerdrake[5000]: running: rmmod parport_pc
May 11 14:10:20 localhost printerdrake[5000]: running: rmmod parport
May 11 14:10:20 localhost printerdrake[5000]: running: /sbin/modprobe
parport_pc
May 11 14:26:58 localhost printerdrake[5799]: running: rmmod parport_pc
May 11 14:26:58 localhost printerdrake[5799]: running: rmmod parport
May 11 14:26:58 localhost printerdrake[5799]: running: /sbin/modprobe
parport_pc
May 11 14:32:49 localhost printerdrake[6268]: running: rmmod parport_pc
May 11 14:32:49 localhost printerdrake[6268]: running: rmmod parport
May 11 14:32:49 localhost printerdrake[6268]: running: /sbin/modprobe
parport_pc
May 11 17:50:13 localhost printerdrake[8777]: running: rmmod parport_pc
May 11 17:50:13 localhost printerdrake[8777]: running: rmmod parport
May 11 17:50:13 localhost printerdrake[8777]: running: /sbin/modprobe
parport_pc
May 11 18:09:24 localhost printerdrake[4204]: running: rmmod parport_pc
May 11 18:09:24 localhost printerdrake[4204]: running: rmmod parport
May 11 18:09:24 localhost printerdrake[4204]: running: /sbin/modprobe
parport_pc


which sadly means nothing to me, however I notice that the permissions do
differ with yours ??

Regards peta
  Reply With Quote
6 19th May 17:15
aragorn
External User
 
Posts: 1
Default /dev/lp0 permission problems


Those are obviously not right... This means that only the root user can
read from and write to the parallel port.

Basically it's just saying you that /printerdrake/ is removing
the /parport_pc/ and /parport/ driver modules from the kernel and reloading them via */sbin/modprobe.*


All Mandriva versions - and basically all other recent GNU/Linux
distributions with a 2.6 kernel generation - make use of the /udev/ system
to populate */dev.* This means that the device special files in */dev*
exist on a /tmpfs/ rather than physically on disk, and that they are set up
there at boot time via information exported about the hardware by the
kernel to /sysfs,/ which is mounted on */sys.*

As such, in order to change the permissions on a device special file and
make sure that these permissions are kept consistent across reboots, you
should look into your /udev/ configuration. I don't use /udev/ myself yet
on this older system and so I'm not exactly sure on how to do that, but you
should be able to find something like */etc/udev.conf* or - more likely on
newer systems - a directory called */etc/udev.d* with lots of configuration
files.

You should look for the proper file for your */dev/lp0* - the configuration
file /might/ be called /parport/ or /parport_pc_/ - and edit it (as root)
with a regular plain text editor such as /vi,/ /emacs,/ /nano/ or /mcedit./
You should be able to set the ownership, group ownership and permissions
there.

Perhaps it would not be a bad idea if the configuration syntax makes no
sense to you that you hunt down the pertaining file(s) and post their
output here, so that one of us can give you a pointer on how to set things
up right. ;-)

Hope this was helpful. ;-)

--
*Aragorn*
(registered GNU/Linux user #223157)
  Reply With Quote
7 19th August 00:17
david w. hodgins
External User
 
Posts: 1
Default /dev/lp0 permission problems


Something is very wrong ...
#grep parport /var/log/syslog
parport_pc 00:0a: reported by Plug and Play ACPI
parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,ECP,DMA]
lp0: using parport0 (interrupt-driven).
(I've snipped the date/time, for shorter line lengths).

I just looked back at the start of the thread, and noticed that you're using
a "One" version. I do know that the "One" version is missing a lot of the
stuff that's in the "Free" Dvd or three cd setup.

It might be faster to install the full version, rather then trying to figure
out what's missing, at this point.

For debugging the current version, I'd start by installing the rpm package
pnputils, then running "lspnp -v", to ensure the parport is being seen. On
my system, the part of the output related to the parport is ...
00:0a PNP0401 ECP printer port
state = active
io 0x378-0x37f
io 0x778-0x77b
irq 7
dma 3

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
  Reply With Quote
8 19th August 00:17
peta
External User
 
Posts: 1
Default /dev/lp0 permission problems


Thank you both Dave and Aragorn for your considered opinions and advice.

Yes I have decided that this is the best course of action, I will spend
this weekend down loading and installing. I am very impressed with this
version of Mandriva it one of the better version from the great team at
Mandriva.

Thank you both for your time and help

Regards peta
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes







Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
Also visit Ogoun the Usenet Archive
666