Problems getting sufficient permissions to use usb scanner

I’m using xsane and configured my scanner in YaST, did a test it scans. but when I try to scan an image or even run sane-find-scanner I get insufficient privileges. I have been trying to figure out how to get myself listed in groups as an allowed user. This is my home computer, no one else uses it.

Any help appreciated.

My apologies, after days of fighting with YaST, I finally took a step back and did a little reading on groups and users. I wasn’t writing out my changes after adding lp to the groups. So it wasn’t getting written to the file. I have been wrestling with this problem for almost a week, I always try to figure out a problem first then do a search here next, but my search just brought up a similiar problem I had a few months ago. The solution was different the cause the same. Permissions, permissions, permissions…

Anyway in case anyone has a problem with sane backends, don’t be like me and go insane, and decide to try another distro, keep reading the man pages, and use google as your friend. The problem was that me the user has a different password than Mr. Root, which is the way it should be. So when ever I logged in as me a regular user I for some strange reason could not access the scanning function of my multifunction printer, I could print, I could copy, it just refused to let me scan. Is scanning national security these days??

Don’t get me wrong I’m not criticizing YaST. but it’s as confusing as hell, especially when it conflicts with configure desktop. Please before anyone starts to jump me, I am always rallying for openSUSE, some people even think I’m nuts for using the distro, and keep trying to force feed Ubuntu or Mint down my throat. But I am the stubborn sort and I choose to stay with openSUSE! Even if it does drive me batty at times!

If I could I would help with documentation but we need more on scanners, and how to use YaST, you can make changes in YaST , think they took effect and they didn’t because they were not written to the config files. Other than that, no complaints…

This is getting frustrating. When I restart my computer i no longer have permissions again to scan… Can someone please help me with the correct commands, preferably from the command line, I am sick to death of YaST!!

Every other distro the **** thing works out of the box…This is a fresh install I did nothing but configured scanner in YaST and added lp to groups. It won’t let me make lp as its own group, because YaST says no…I love this distro I really do but I’m up to my ears in config files, I may as well install Arch

The explanations are convoluted and move from one book to another on how to configure something as easy as a freaking usb scanner, this is far from sane…

What scanner are you using? Is it an HP? If so, have you installed hplip?

It’s a Canon MP495, I had it working last night. I shutdown my computer at night, restarted this morning and the same problem with permissions again today.

I don’t know if this will help, but it is the problem.

This is what I get back after running sane-find-scanner logged in as me as a normal user. I have a separate root account, that naturally lets me run anything. But I should NOT have to log in as root just to run my USB scanner.

" could not open USB device 0x1d6b/0x0002 at 007:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 008:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 005:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 004:001: Access denied (insufficient permissions)
found USB scanner (vendor=0x04a9 [Canon], product=0x1747 [MP495 series]) at libusb:006:002
could not open USB device 0x1d6b/0x0002 at 006:001: Access denied (insufficient permissions)
could not open USB device 0x046d/0xc52e at 003:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 003:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 001:001: Access denied (insufficient permissions) " Quotes are mine to show the readout from the konsole

I don’t know if this is a bug with Leap 42.1 that will be fixed in 42.2, but I know this is not normal.

For the heck of it I downloaded onto a usb stick Linux Mint 18, I just dd’ed it to a USB thumb drive to see if it would make a difference and sure enough after booting into the live install the scanner worked just fine right out of the box, in simple scan , a pre installed yet simpler version of xsane, my point being the scanner works.

I do not however plan on going back to Mint or any other distro for that matter, I like my SUSE Gecko too much. I’m extremely frustrated with the lack of help and documentation on scanners though. Close to 30 people read my post but no one knows the answer??

I need some help getting these permissions set and to stay set and not lose them on a reboot…

My apologies, after days of fighting with YaST, I finally took a step back and did a little reading on groups and users. I wasn’t writing out my changes after adding lp to the groups. So it wasn’t getting written to the file. I have been wrestling with this problem for almost a week, I always try to figure out a problem first then do a search here next, but my search just brought up a similiar problem I had a few months ago. The solution was different the cause the same. Permissions, permissions, permissions…

This is getting frustrating. When I restart my computer i no longer have permissions again to scan… Can someone please help me with the correct commands, preferably from the command line, I am sick to death of YaST!!

It’s not clear to me about why YaST is not working for you, but as with most things you can use a CLI approach instead. For example, to add user ‘harry’ to group ‘lp’ you can do

sudo usermod -a -G lp harry

This will take effect at next login.

Starting from the top… show us which groups the user needing scanner access is a member of. Do (as user)

groups

FWIW, there should be a udev rule for your scanner that take care of assigning group ownership to ‘lp’ group. Once can be added if necessary, but I think you just need to make your your a member of the ‘lp’ group.

me the user (username) is a member of users, lp in groups. This is whats listed under the Users pane in User and Group administration

Now I just tried to add from the terminal my username into groups lp using your command and it added radvd to group members in the groups pane it reads under Group name I have listed “users” , under group members it lists lp,games,myusername,radvd

I tried creating a group named lp under YaST but sir YaST won’t let me. It’s “attila the hun”

Okay, but I prefer commands and output to verbal descriptions. I would like to have seen what was returned from running the ‘groups’ command for the user account concerned.

I tried creating a group named lp under YaST but sir YaST won’t let me. It’s “attila the hun”

You don’t need to create the group. It exists already. What you need to do is make a given user a member of the lp group. Once you have done that, run the following as regular user

sane-find-scanner

and/or

scanimage -L

and report back.

Here is what I got after running groups command in terminal :

johnb@linux-13dr:~> groups
users lp

Here is what I get after running sane-find-scanner

johnb@linux-13dr:~> sane-find-scanner

sane-find-scanner will now attempt to detect your scanner. If the

result is different from what you expected, first make sure your

scanner is powered up and properly connected to your computer.

No SCSI scanners found. If you expected something different, make sure that

you have loaded a kernel SCSI driver for your SCSI adapter.

could not open USB device 0x1d6b/0x0002 at 008:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 006:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 005:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 004:001: Access denied (insufficient permissions)
found USB scanner (vendor=0x04a9 [Canon], product=0x1747 [MP495 series]) at libusb:007:002
could not open USB device 0x1d6b/0x0002 at 007:001: Access denied (insufficient permissions)
could not open USB device 0x046d/0xc52e at 003:002: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 003:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 002:001: Access denied (insufficient permissions)
could not open USB device 0x1d6b/0x0001 at 001:001: Access denied (insufficient permissions)

Your USB scanner was (probably) detected. It may or may not be supported by

SANE. Try scanimage -L and read the backend’s manpage.

Not checking for parallel port scanners.

Most Scanners connected to the parallel port or other proprietary ports

can’t be detected by this program.

You may want to run this program as root to find all devices. Once you

found the scanner devices, be sure to adjust access permissions as

necessary.

I did run the command you originally said to run naturally replacing it with my username. Now in Groups under Group name users there is a listing for games, johnb,radvd (radvd) isn’t even in the list of groups, I have no idea how it got there…

sudo usermod -a -G lp harry

If I could I would help with documentation but we need more on scanners, and how to use YaST, you can make changes in YaST , think they took effect and they didn’t because they were not written to the config files. Other than that, no complaints…

Managing Users with YaST:
https://doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/cha.y2.userman.html
Setting up a Scanner:
https://doc.opensuse.org/documentation/leap/startup/html/book.opensuse.startup/cha.y2.hw.html#sec.y2.hw.scan

A great openSUSE troubleshooting guide:
https://en.opensuse.org/SDB:Configuring_Scanners

USB scanners and scanner units in USB multifunction devices (printer/scanner/copier) get normal-user read/write access via udev and for the printer unit in a USB multifunction device it is sufficient that the device node has group “lp” and group read/write access (also via udev) because the CUPS backend runs as user “lp” that is in group “lp”. (CUPS backends and SANE backends are different things. For CUPS backends see “What is a CUPS backend and how does it work” in SDB:CUPS in a Nutshell.)
Therefore USB scanners and USB multifunction devices get “rw-rw-r-- root lp” set for the device node which happens via /etc/udev/rules.d/55-libsane.rules (from sane-backends RPM) and for HP all-in-one devices additionally via /usr/lib/udev/rules.d/56-hpmud.rules (from the hplip RPM).

Great! The user ‘johnb’ is a member of the ‘lp’ group.

Here is what I get after running sane-find-scanner

Great, the scanner is detected as expected…

found USB scanner (vendor=0x04a9 [Canon], product=0x1747 [MP495 series]) at libusb:007:002

So, now what happens when you launch ‘simple-scan’, ‘xsane’, or your preferred scanner utility from a terminal?

simple-scan

**deano_ferrari **After running simple-scan, I still got scanner undetected. So I got fed up and did a full OS re install. Something was borked , I don’t know what and lost patience finding out. Anyway, I re installed openSUSE leap 42.1, I use a custom partition scheme where if I bork the OS, I don’t lost my home folder, I put a mount point for it on another hard drive…configured the scanner in YaST, using MP495 BTW- it asked for people to report if it works or not. It does.

I then added me the user to groups lp as you suggested earlier from the terminal, logged out and back in and first ran from terminal simple-scan, it opened up right away and detected my scanner. I then installed xsane, it also opened up right away…I say this because when it “wasn’t” detecting my scanner it would take forever to even open the app, i’m talking like 40-60 seconds, it got to a point where I would hit ctrl, esc to kill the process.

Anyway I don’t know if it was something I did in YaST, (probably) or not but I’m much more comfortable working from the terminal, it’s much harder to cut off your fingers in the terminal.

deano_ferrari, I just want to thank you for your time in helping me out and providing me with documentation, I can now study up on. I’m going to read up on those docs to try to find out what I did wrong and how “radvd” ended up in my groups, when it wasn’t even listed in my groups.

Anyway, thanks again!

I’m glad to read that you finally got your scanner working even with the drastic measure to reinstall.

I then added me the user to groups lp as you suggested earlier from the terminal, logged out and back in and first ran from terminal simple-scan, it opened up right away and detected my scanner. I then installed xsane, it also opened up right away…I say this because when it “wasn’t” detecting my scanner it would take forever to even open the app, i’m talking like 40-60 seconds, it got to a point where I would hit ctrl, esc to kill the process.

Anyway I don’t know if it was something I did in YaST, (probably) or not but I’m much more comfortable working from the terminal, it’s much harder to cut off your fingers in the terminal.

Well done. Your perseverance with this paid off!

deano_ferrari, I just want to thank you for your time in helping me out and providing me with documentation, I can now study up on. I’m going to read up on those docs to try to find out what I did wrong and how “radvd” ended up in my groups, when it wasn’t even listed in my groups.

Anyway, thanks again!

Glad to have been of some guidance. :slight_smile: