LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 11-17-2009, 02:24 PM   #1
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 669
Blog Entries: 11

Rep: Reputation: 36
printer scanner permission problem


I have an all-in-one scanner/printer from HP. I used to be able to scan and print without problem. Now I can print but only scan if I use xsane as root. Xsane says "no devices available". I went to the 'Users and Groups' app under 'System -> Administration' and my user *is* in the scanner group. The checkbox next to 'Use Scanners' is already checked.

I recently removed hpoj, then more recently I tried to reinstall it and aptitude tried to remove hpijs and hplip ... in the past I think I had both installed. hpoj doesn't allow me to select my printer from cups so I'd rather stick with hpijs. I don't know if this effects things at all though.

Thanks in advance. Any help would be appreciated.

Last edited by radiodee1; 11-17-2009 at 02:25 PM.
 
Old 11-17-2009, 02:44 PM   #2
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 66
I happen to dealing with the problem myself. The problem is that udev is setting the permissions on the usb device /dev/bus/usb/###/### to 0660 with the user root and the group either lp or scanner.

There is a rule in /lib/udev/rules.d/50-udev-default.rules which sets the printer info:
Code:
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="", IMPORT{program}="usb_id --export %p"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}==":0701*:", GROUP="lp", MODE="660"
And anther rule in /lib/udev/rules.d/53-sane.rules which sets the scanner info, there is one rule for each scanner model...

My solution for the moment is to create a custom rule in /etc/udev/rules.d/99-custom.rules:
Code:
ATTR{idVendor}=="04b8", ATTR{idProduct}=="0813", MODE="0666", GROUP="lp"
You need to replace your vendor and product id's, you can find them like this:
Code:
lsusb
Bus 001 Device 002: ID 04b8:0813 Seiko Epson Corp. Stylus CX6500/6600
I don't consider this a good fix though. You could have sane run as group lp (or cups run as group scanner), or create some lpscanner group for the bother of them. I'm not really sure how to reconcile the need for the two groups at the moment.

Last edited by Meson; 11-17-2009 at 02:47 PM.
 
Old 11-17-2009, 03:44 PM   #3
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 669
Blog Entries: 11

Original Poster
Rep: Reputation: 36
Thanks for the fast reply. I tried this and it works.

BTW, I tried other things after your post that didn't work. There's a file in /etc/default/ called saned. It has an option for "RUN_AS_USER" which I set to "lp". After setting another option "RUN" to "yes" I executed "/etc/init.d/saned restart" but this resulted in nothing useful. Your solution seems to produce the desired effect. If you come across something more elegant, please do post it as it would interest me. Thanks.

Also, do you think this is an error in some particular piece of software? As I stated, the xsane program used to work for me just fine until a few days ago.
 
Old 11-17-2009, 04:29 PM   #4
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
Thanks for the fast reply. I tried this and it works.
Good. I am happy for you

But ... .. . (and read this to the end, please)

Quote:
As I stated, the xsane program used to work for me just fine until a few days ago.
So, what did you change?

What distro are you running this on ? [Your profile, at Left says "Distribution: Debian etch, lenny, squeeze", so which, exactly, is it?]

Quote:
I have an all-in-one scanner/printer from HP
Ok, but
- What model is it, exactly?
- What is its USB ID, if it is connected by USB ?
- Where's the link to the manufacturer's PDF manual for it?

Etc... .. .

Apologies if you see me as whining at you, but you'll appreciate that LQ is a valuable resource. Google re-indexes it about every minute (so they clearly see it as a useful resource of information).

If you don't include vital search terms ( your scanner's model number, its USB IDs (or other unique identification) your distro... ) then we are less able to help you personally (perhaps by doing searches for you) and the internet search engines will be unable to help other people running your distro with your specific HP scanner problems.

Maybe you have by now solved your problems, with Meson's inspired help but how has that helped the wider community?

Does that matter to you?

Please think about this, and then add a reply to this thread with the DETAILS, so those search-engines can index it to help others searching for a resolution to the same problem.

It's painless
And it all helps
 
1 members found this post helpful.
Old 11-17-2009, 04:34 PM   #5
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 66
Quote:
Originally Posted by radiodee1 View Post
It has an option for "RUN_AS_USER" which I set to "lp".
We are working with GROUPS here, not USERS.
 
Old 11-17-2009, 04:38 PM   #6
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 669
Blog Entries: 11

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by Meson View Post
We are working with GROUPS here, not USERS.
Thanks. It didn't work, but I tried that so I wrote that I tried that. It was obviously dumb.
 
Old 11-17-2009, 04:51 PM   #7
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 669
Blog Entries: 11

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by tredegar View Post
Good. I am happy for you

So, what did you change?
I think I said that I tried to uninstall 'hpoj' and found that I couldn't re-install it without removing other vital print oriented packages. I believe that at an earlier time I had all of those packages installed, hpoj, hpijs, and hplip. I may be wrong but I thought I was clear.
Quote:
What distro are you running this on ? [Your profile, at Left says "Distribution: Debian etch, lenny, squeeze", so which, exactly, is it?]
Right now I use Debian Squeeze. I used to run Etch and Lenny. I've reinstalled once because I changed hardware (if that makes sense...)
Quote:
Ok, but
- What model is it, exactly?
- What is its USB ID, if it is connected by USB ?
- Where's the link to the manufacturer's PDF manual for it?
Sorry about that.
HP Photosmart C3180 All-in-one
Bus 003 Device 002: ID 03f0:5611 Hewlett-Packard PhotoSmart C3180
I don't have a link for the manufacturer's manual.
Quote:
Please think about this, and then add a reply to this thread with the DETAILS, so those search-engines can index it to help others searching for a resolution to the same problem.

It's painless
And it all helps
I didn't think my original post was that bad.
 
Old 12-08-2009, 05:17 PM   #8
JanHeldal
LQ Newbie
 
Registered: Dec 2009
Posts: 2

Rep: Reputation: 0
Lightbulb Scanner permission problem: A simple solution that worked for me.

Hi.
I have recently installed Arch Linux. However, my multipurpose printer-scanner (a HP Deskjet F2280 ) would not scan unless I ran xsane as root. (Sane could only find a scanner if it ran with root permissions.) A friend helped me track down the problem. It was not sufficient for the user to be in the "scanner" group, but adding the user to the "lp" group as well, solved the problem. (A user can be a member of many groups simultaneously.)
Hope this info will help someone out there.
 
Old 12-09-2009, 11:58 PM   #9
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 66
Quote:
Originally Posted by JanHeldal View Post
I have recently installed Arch Linux.
Nice choice =)
 
Old 12-14-2009, 11:27 AM   #10
fynstee
LQ Newbie
 
Registered: Oct 2007
Posts: 8

Rep: Reputation: 0
Does anyone know why udev (or sane?) sometimes seems to ignore the rules in the /lib/udev/rules.d directory?

Mensons post (#2) is a good example of what I mean. He had to create a custom rule in /etc/udev/rules.d/99-custom.rules to get his scanner working. I've had to do the same in the past too. Even though both scanner devices were in the /lib/udev/rules.d/53-sane.rules file.

In the end I just copied and pasted everything from the 53-sane.rules file to a custom file /etc/udev/rules.d/96-scanner.rules

Now xsane detects the three different scanners my laptop has access to with no problem (a Mustek 1200, Canoscan n1240u & another which is not mine). But shouldn't 53-sane.rules have allowed that anyway? All three scanners were given rules in 53-sane.rules, so why was a custom file needed in a different directory?

PS. am running Arch-linux also
 
  


Reply

Tags
arch, deskjet, hp, lp, permissions, scanner


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Scanner/Printer Combo Unit - Scanner Works - Printer Does Not rrrssssss Linux - Hardware 1 03-04-2007 10:49 PM
Solved -- Permission problem with Avision AV220 Scanner jlinkels Linux - Hardware 0 01-31-2006 05:11 PM
permission setting of a scanner? behmjoe Linux - Hardware 1 01-01-2006 03:53 AM
Problem with Brother Printer/Scanner unihiekka Linux - Hardware 1 10-26-2005 12:13 PM
Printer Permission problem with samba techrolla Linux - Software 5 05-26-2004 05:20 PM


All times are GMT -5. The time now is 12:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration