cups print to file - but file size is zero

Nitin Kanaskar nitinvk04 at gmail.com
Mon Nov 20 07:50:39 PST 2006


> > Nitin Kanaskar wrote:
> >
> > > I checked the /var/log/messages - but did not find
> > > any error message there.
> > > Also checked rights of the directories - /var , /var/spool, and
> > > /var/spool/cups. /var & /var/spool are owned by root user, root group.
> > > /var/spool/cups is owned by root user, lp group. Inside the
> > > /var/spool/cups directory, there were no d* files, instead c* files. and a
> > > tmp directory. All these files were owned by root user, sys group. The tmp
> > > folder was owned by root user, lp group. I am trying to understand this -
> > > but the program which tries to access these files is lpr, right? which
> > > does not have rights to access these directories and the files in them.
> > > Is this what is happening, so that I need to change access rights of
> > > these folders and then they would be accessible by this user.
> > > Please clarify if my guess about the user and these directories
> > > is correct.
> >
> >
> > Seems that nobody, except root can write to the directory /var/spool/cups.
> > cupsd (with non-root rights) is the process which tries to write a file
> > into this directory.
> >
> >
> > Working permissions can look like this:
> >
> > drwxr-xr-x  root root  /var
> > drwxr-xr-x  root root  /var/spool
> > drwx--x---  root lp    /var/spool/cups
> > drwxrwx--T  root lp    /var/spool/cups/tmp
> >
> >
> > best regards!
> > Bernd
>
> hello Michael and Bernd,
>
> Thanks a lot for your interest and the help
> offered. I finally managed to print to a file.
> The culprit was the default SELinux configuration
> on fedora for cups daemon and lpd which was not
> allowing to read file from /var/spool/cups folder.
> I disabled the
> SELinux policy for these and I got my file
> in /tmp/nitin.
> Thanks a lot guys once again for your pointers
> and suggestions!
>
> Best Regards,
> Nitin
>
>

hello guys,

I just wanted to let you know
that disabling SELinux configuration for
cupsd and lpd solved another problem for me
- the resetting of cups configurations when
I used to restart cups. I tried first to
shut down cups-config-daemon as
I learnt that cups-config-daemon has some issue
on red hat platforms, but it failed.
So whenever I used to add a new printer, it was
shown as the output of 'lpstat -v -d'. But
after restarting cups, it used to be deleted.
But after disabling the SELinux, all is fine.
This is just for reference if anybody faced
similar problem.

Thanks,
Nitin




More information about the cups mailing list