plugin still reported missing after installation

Bug #1133486 reported by xormar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
HPLIP
Fix Released
Undecided
Unassigned
Gentoo Linux
Fix Released
Medium

Bug Description

After reinstalling hplip (I think this upgraded it from 3.12.10a to 3.13.2) on Gentoo x86_64, the binary plugin was reported missing when trying to use the scanner of a HP_LaserJet_100_colorMFP_M175nw. (Printing worked).

I tried multiple ways to install the plugin:
- starting xsane, which popped up the hp-plugin installer
- through hp-toolbox -> install required plugin
- as root, running hp-plugin from the command line

In all cases, hp-plugin reported success in installing the plugin.

In the cases where hp-plugin was launched from an other application (and as a normal user, not root), this application reported an error, immediately after hp-plugin had reported success.

hp-check also reported the plugin as missing (see attachment).

By chance I noticed that /var/lib/hp had permissions 644 (i.e. the executable bit was missing after the upgrade).
Setting the permissions to 755 manually solved the problem.

I don't know if this was done by the Gentoo installer or as part of the HP install routine.
I just thought I'd mention it so you can check.

Revision history for this message
In , cctsurf (cctsurf) wrote :

After upgrading to net-print/hplip-3.13.2-r1, whenever I attempt to scan, I get a dialog saying that I need to install the binary plugin. So, I walk through the installation process and it tells me that I have installed the plugin successfully. But then, an error comes up, saying that I must have canceled out of the install or the plugin install failed.
Any way in which I install the plugin, including "sh hplip-version-plugin.run" is not seen by the user.
After downgrading to hplip-3.12.10a, everything works correctly. What I find most interesting is that doing a hp-check under both versions as root shows that the plugin is installed, and as user, shows that the plugin is not installed. Yet with the old version, it works and scans as it should.
I have posted the hp-check info at http://forums.gentoo.org/viewtopic-t-952040.html
Thanks

Revision history for this message
In , cctsurf (cctsurf) wrote :
Download full text (7.9 KiB)

emerge --info
Portage 2.1.11.52 (default/linux/amd64/13.0/desktop/kde, gcc-4.6.3, glibc-2.16.0, 3.8.0-gentoo x86_64)
=================================================================
System uname: Linux-3.8.0-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1045T_Processor-with-gentoo-2.2
KiB Mem: 8168848 total, 6146372 free
KiB Swap: 5242876 total, 5242876 free
Timestamp of tree: Sun, 24 Feb 2013 13:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash: 4.2_p42
dev-java/java-config: 2.1.12-r1
dev-lang/python: 2.7.3-r3, 3.2.3-r2
dev-util/ccache: 3.1.9
dev-util/cmake: 2.8.10.2-r1
dev-util/pkgconfig: 0.28
sys-apps/baselayout: 2.2
sys-apps/openrc: 0.11.8
sys-apps/sandbox: 2.6
sys-devel/autoconf: 2.13, 2.69
sys-devel/automake: 1.9.6-r3, 1.11.6, 1.13.1
sys-devel/binutils: 2.23.1
sys-devel/gcc: 4.6.3
sys-devel/gcc-config: 1.8
sys-devel/libtoo...

Read more...

Revision history for this message
In , Andre-reinke (andre-reinke) wrote :

Same issue over here :/

Revision history for this message
xormar (public-wernig) wrote :
Revision history for this message
In , xormar (public-wernig) wrote :

Had the same problem. Looking at the output from hp-check -t I found:

hp-check -t
...
Current contents of '/var/lib/hp/hplip.state' file:
Plugins are not installed. Could not access file: Permission denied

/var/lib/hp actually has permissions 644 after the upgrade to 3.13.2

Changing it manually to 755 (sudo chmod 755 /var/lib/hp) solved the problem for me.

I have reported this also on the hplip bug tracker: https://bugs.launchpad.net/hplip/+bug/1133486

Revision history for this message
In , Andre-reinke (andre-reinke) wrote :

(In reply to comment #3)
> Had the same problem. Looking at the output from hp-check -t I found:
>
> hp-check -t
> ...
> Current contents of '/var/lib/hp/hplip.state' file:
> Plugins are not installed. Could not access file: Permission denied
>
>
> /var/lib/hp actually has permissions 644 after the upgrade to 3.13.2
>
> Changing it manually to 755 (sudo chmod 755 /var/lib/hp) solved the problem
> for me.

Confirming that!

Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

(In reply to comment #3)
> Had the same problem. Looking at the output from hp-check -t I found:
>
> hp-check -t
> ...
> Current contents of '/var/lib/hp/hplip.state' file:
> Plugins are not installed. Could not access file: Permission denied
>
>
> /var/lib/hp actually has permissions 644 after the upgrade to 3.13.2
>
> Changing it manually to 755 (sudo chmod 755 /var/lib/hp) solved the problem
> for me.
>
> I have reported this also on the hplip bug tracker:
> https://bugs.launchpad.net/hplip/+bug/1133486

The Gentoo ebuild does not alter permissions of /var/lib/hp. Recently there were permission issues with /var/log/hp which have been fixed.

Looking at the source code there is the following in base/g.py:

in hplip-3.12.10a
if not os.path.exists('/var/lib/hp/') and os.geteuid() == 0:
  os.makedirs('/var/lib/hp/')
  os.system('chmod 644 /var/lib/hp/')

in hplip-3.13.2
if not os.path.exists('/var/lib/hp/') and os.geteuid() == 0:
  os.makedirs('/var/lib/hp/')
  cmd = 'chmod 644 /var/lib/hp/'
  os_utils.execute(cmd)

Maybe this change caused the issue. Probably it did not work before and now it does. However a directory shouldn't have 644 permissions at all.

Changed in gentoo:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Hi,

Thank you for reporting the issue.
We have fixed this issue by changing "/var/lib/hp" directory permissions to 755. Fix will be available in next HPLIP release.

Thanks & Regards,
Amarnath

Revision history for this message
Amarnath Chitumalla (amarnath-chitumalla) wrote :

Patch:-

1) please copy attached g.py to /usr/share/hplip folder in root mode
$ su -c 'cp g.py /usr/share/hplip/base'

2) change /var/lib/hp folder permissions to 755 (if /var/lib/hp folder, exists)
$ su -c 'chmod 755 /var/lib/hp'

Thanks & Regards,
Amarnath

Changed in hplip:
status: New → Fix Committed
Revision history for this message
In , Billie-gentoo (billie-gentoo) wrote :

+*hplip-3.13.2-r2 (01 Mar 2013)
+
+ 01 Mar 2013; Daniel Pielmeier <email address hidden> +hplip-3.13.2-r2.ebuild:
+ Revison bump. Fix bug #458976. Wrong permissions again. This time for
+ /var/lib/hp/. Thanks to James for the report. Only remove /var/lib/hp/ if it
+ is world writeable.

Should be fixed. Please reopen if there are still problems.

Changed in gentoo:
status: New → Fix Released
Ani Balakrishnan (anib)
Changed in hplip:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.