Red Hat Bugzilla – Bug 58956
foomatic-datafile can't be run as non-root
Last modified: 2008-05-01 11:38:01 EDT
A non-root user can't run foomatic-datafile to retrieve information about the
correct driver for a printer.
The worst effect of this is that the "cups-drivers" package (which basically
just turns the foomatic database into CUPS PPD files) doesn't build as user.
[bero@spock bero]$ /usr/sbin/foomatic-datafile -t cups -p 75712 -d stcolor
mkdir: cannot create directory `/var/cache/foomatic/compiled': Permission denied
chmod: failed to get attributes of `/var/cache/foomatic/compiled/': No such file
sh: /var/cache/foomatic/compiled/combo/stcolor/75712.xml: No such file or directory
Could not mkdir /var/cache/foomatic/pcache
Could not mkdir /var/cache/foomatic/pcache/source
Could not mkdir /var/cache/foomatic/pcache/source/printer
can't create /var/cache/foomatic/pcache/source/printer/75712.perl.15747: No such
file or directory at /usr/lib/perl5/site_perl/5.6.1/Foomatic/DB.pm line 2519
Ideally, foomatic-datafile wouldn't depend on the cache to run.
Alternatively, it should be possible to specify a different cache directory
(cachedir is set in /usr/lib/perl5/site_perl/5.6.1/Foomatic/Defaults.pm, and not
replaced anywhere, I think) like /tmp/foomatic.
In foomatic-1.1-0.20020129.1 the variable FOOMATIC_CACHEDIR can override $cachedir.
I haven't had feedback from the maintainers yet; I'll reopen this bug if it turns
out that this is the wrong way to fix it.
The patch has been accepted and is now in CVS.