[SOLVED] Wrong permissions on driver file

[SOLVED] Wrong permissions on driver file

Postby kateto » May 17th, '16, 21:13

Hi all!
Today Xsane refused to detect my HP Officejet 4500 G510g-m printer-cum-scanner-cum-fax. Strangely enough, I can photocopy and print with no issues. I only succeeded to use Xsane as root, and it seems to be a permission problem. hp-doctor complained like this:
Code: Select all
hp-doctor[22452]: debug: Deskjet-1050-J410-series
hp-doctor[22452]: debug: ------------------------
hp-doctor[22452]: debug: Device URI: hp:/usb/Deskjet_1050_J410_series?serial=CN1AL1N2PM05QT
hp-doctor[22452]: debug: PPD: /etc/cups/ppd/Deskjet-1050-J410-series.ppd
warning: Fail to read ppd=/etc/cups/ppd/Deskjet-1050-J410-series.ppd file
warning: Insufficient permission to access file /etc/cups/ppd/Deskjet-1050-J410-series.ppd
warning: Could not complete Queue(s) configuration check

This was the output of sane-find-scanner:
Code: Select all
could not open USB device 0x03f0/0x2d12 at 001:006: Access denied (insufficient permissions)

Ownerships and permissions are as follows:
Code: Select all
[root@localhost ppd]# ll
total 124
-rw-r--r-- 1 root sys 20644 ago 24  2015 Canon-BJC-85.ppd
-rw-r----- 1 root lp  17026 mai  7 09:07 Deskjet-1050-J410-series.ppd
-rw-r----- 1 root lp  17034 mai  7 09:07 Deskjet-1050-J410-series.ppd.O
-rw-r--r-- 1 root sys  2829 set 21  2013 Officejet_4500_G510g-m_fax.ppd
-rw-r----- 1 root lp  26566 mai  7 09:07 Officejet_4500_G510g-m.ppd
-rw-r----- 1 root lp  26574 mai  7 09:07 Officejet_4500_G510g-m.ppd.O

I did a "chown a+r" on the driver file Officejet_4500_G510g-m.ppd, but the issue persists. What permissions and ownerships have you got on your drivers?
Last edited by kateto on May 26th, '16, 14:57, edited 1 time in total.
kateto
 
Posts: 61
Joined: Jul 31st, '12, 13:00

Re: Wrong permissions on driver file

Postby doktor5000 » May 17th, '16, 21:21

How did you install it in the first place? Please try again with hp-setup as root.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Wrong permissions on driver file

Postby kateto » May 18th, '16, 10:32

I installed it years ago, can't remember how but certainly the usual way (MCC) and it had always worked flawlessly. I still don't get why it stopped working.
I've just uninstalled it with MCC and reinstalled with hp-setup as root. Still couldn't print. Permissions were:
Code: Select all
-rw-r----- 1 root lp   2829 mai 18 10:26 Officejet_4500_G510g-m_fax.ppd
-rw-r----- 1 root lp  26568 mai 18 10:26 Officejet_4500_G510g-m.ppd

I've given it more read permissions with "chmod a+r Officejet_4500_G510g-m*". Still no luck. By the way, what the permissions and ownerships should be, anyway?
kateto
 
Posts: 61
Joined: Jul 31st, '12, 13:00

Re: Wrong permissions on driver file

Postby kateto » May 21st, '16, 16:26

Hellooo, can somebody just do 'ls' in their /etc/cups/ppd directory and post the output here at least??
kateto
 
Posts: 61
Joined: Jul 31st, '12, 13:00

Re: Wrong permissions on driver file

Postby Ken-Bergen » May 21st, '16, 21:40

Code: Select all
[ken@localhost bin]$ ls -l /etc/cups/ppd
total 56
-rw-r----- 1 root lp 24636 Apr 26 18:22 Samsung_CLP-300.ppd
-rw-r----- 1 root lp 24641 Apr 26 18:21 Samsung_CLP-300.ppd.O
The printer works.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Wrong permissions on driver file

Postby richardwest » May 21st, '16, 22:23

Code: Select all
bash-4.3$ ls -l /etc/cups/ppd
total 144
-rw-r----- 1 root lp 33372 Feb 15 16:22 Brother-MFC-J4625DW.ppd
-rw-r----- 1 root lp 33353 Feb 15 14:58 Brother-MFC-J4625DW.ppd.O
-rw-r----- 1 root lp 33392 Feb 15 16:27 Brother-Photo-4x6.ppd
-rw-r----- 1 root lp 33372 Feb 15 16:26 Brother-Photo-4x6.ppd.O


Printer works fine
Richard.
richardwest
 
Posts: 50
Joined: May 26th, '11, 12:28
Location: Suffolk, England

Re: Wrong permissions on driver file

Postby doktor5000 » May 21st, '16, 23:23

kateto wrote:This was the output of sane-find-scanner:
Code: Select all
could not open USB device 0x03f0/0x2d12 at 001:006: Access denied (insufficient permissions)

That's the problem, the PPDs are irrelevant for scanning.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Wrong permissions on driver file

Postby kateto » May 22nd, '16, 22:33

I see. If not the PPDs, where should I look? How could I debug this?
kateto
 
Posts: 61
Joined: Jul 31st, '12, 13:00

Re: Wrong permissions on driver file

Postby doktor5000 » May 22nd, '16, 23:39

Check the owner/group via
Code: Select all
ls -la /dev/bus/usb/*

It appears it could also be possible to add your user to the scanner group, but I don't have a scanner and am not sure how it's supposed to work.

See also http://www.hauweele.net/~gawen/blog/?p=8 or https://help.ubuntu.com/community/Scann ... ion_Issues and https://bbs.archlinux.org/viewtopic.php?id=45992
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Wrong permissions on driver file

Postby kateto » May 26th, '16, 14:56

Thanks for the links, they were helpful.
In the end, I solved the problem by firing up userdrake and adding my user to the 'lp' group.
I still wonder what sort of update may have broken it, though, as it used to work.
kateto
 
Posts: 61
Joined: Jul 31st, '12, 13:00

Re: [SOLVED] Wrong permissions on driver file

Postby laidlaws » Jul 9th, '16, 13:43

Same problem here:

found USB scanner (vendor=0x04f9 [Brother], product=0x0283 [MFC-J825DW]) at libusb:001:002

ls -la /dev/bus/usb/* gives

crw-rw-r--+ 1 root lp 189, 1 Jul 9 21:36 002

This is since a reinstall of Mga5 a couple of weeks ago.

But adding myself to the "lp" group made no difference, even after a reboot.
Using "sudo" I needed to specify a DISPLAY.
Using "su -" produced the Xsane license screen.
laidlaws
 
Posts: 233
Joined: May 24th, '11, 04:58

Re: [SOLVED] Wrong permissions on driver file

Postby laidlaws » Jul 9th, '16, 14:13

This may be a clue:

Trying in Cauldron, I got a message that HPLIP cannot detect devices, and it may be a firewall problem. Investigating further at present.
laidlaws
 
Posts: 233
Joined: May 24th, '11, 04:58

Re: [SOLVED] Wrong permissions on driver file

Postby doktor5000 » Jul 9th, '16, 14:36

If you have a separate problem, please open a separate thread, as this one was marked solved.

And where's the relation between usb devicenode permissions and firewall ?
Also in your permissions output the + at the end indicates an ACL is present, so better check that with getfacl /dev/bus/usb/*

For brother scanners you need to adapt this from their FAQ: http://support.brother.com/g/s/id/linux ... edirect=on
Check the entry I cannot use my USB scanner with a normal user.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17630
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [SOLVED] Wrong permissions on driver file

Postby laidlaws » Jul 9th, '16, 14:56

Sorry, the distinction between USB and network just dawned on me, and I came back to edit.

I am well aware of the edit to /etc/udev/rules.d/60-libsane.rules, and have checked that it is present.
laidlaws
 
Posts: 233
Joined: May 24th, '11, 04:58

Re: [SOLVED] Wrong permissions on driver file

Postby laidlaws » Jul 9th, '16, 15:14

In Cauldron, the brscan RPM was missing, but installing it didn't help.

Starting a new thread for Official.
laidlaws
 
Posts: 233
Joined: May 24th, '11, 04:58


Return to Printers and Scanners

Who is online

Users browsing this forum: No registered users and 1 guest

cron