From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: bug#33105: cups Can't create temporary file or stopped "Filter failed" Date: Sun, 21 Oct 2018 09:53:25 +0300 Message-ID: <20181021065325.GD1102@macbook41> References: <87woqcea7q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oj4kGyHlBMXGt3Le" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gE7cj-0006HU-DP for bug-guix@gnu.org; Sun, 21 Oct 2018 02:54:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gE7cg-0000mv-6q for bug-guix@gnu.org; Sun, 21 Oct 2018 02:54:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57710) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gE7cg-0000mn-2N for bug-guix@gnu.org; Sun, 21 Oct 2018 02:54:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gE7cf-00017I-Of for bug-guix@gnu.org; Sun, 21 Oct 2018 02:54:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <87woqcea7q.fsf@gmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Oleg Pykhalov Cc: 33105@debbugs.gnu.org --oj4kGyHlBMXGt3Le Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 20, 2018 at 09:36:57PM +0300, Oleg Pykhalov wrote: > Hello Guix, >=20 > I've spotted a bug in CUPS service =E2=80=9CCan't create temporary file= =E2=80=9D. If I > gave =E2=80=98765=E2=80=99 permissions to =E2=80=98/var/spool/cups/tmp/= =E2=80=99 directory then an error > is =E2=80=9Cstopped "Filter failed"=E2=80=9D. =E2=80=98777=E2=80=99 for = /var/spool/cups/tmp/ is > required to print a test page via CUPS WEB interface. >=20 >=20 > I read gnu/services/cups.scm and found that the /var/spool/cups/ > directory should be owned by =E2=80=98lp=E2=80=99 user: > --8<---------------cut here---------------start------------->8--- > (define %cups-activation > ;; Activation gexp. > (with-imported-modules '((guix build utils)) > #~(begin > (use-modules (guix build utils)) > (define (mkdir-p/perms directory owner perms) > (mkdir-p directory) > (chown "/var/run/cups" (passwd:uid owner) (passwd:gid owner)) > ;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > (chmod directory perms)) > ;; =E2=80=A6 > (let ((user (getpwnam "lp"))) > ;; =E2=80=A6 > (mkdir-p/perms "/var/spool/cups/tmp" user #o755) ; <---------- > ;; =E2=80=A6 > )))) > --8<---------------cut here---------------end--------------->8--- >=20 >=20 > Maybe we should make /var/spool/cups/tmp directory owned by =E2=80=98lp= =E2=80=99 user, > too? WDYT? currently /var/spool/cups is root:lp, my first thought is to change it to lp:lpadmin (not sure where I got lpadmin from) and make it 775. >=20 > Test page was printed successfully with: > --8<---------------cut here---------------start------------->8--- > $ sudo ls -ld /var/spool/cups/tmp > drwxr-xr-x 2 lp lp 4096 Oct 20 21:20 /var/spool/cups/tmp > --8<---------------cut here---------------end--------------->8--- >=20 >=20 > From cups-files.conf(5) man page: >=20 > TempDir directory > Specifies the directory where short-term temporary files are > stored. The default is "/var/spool/cups/tmp". >=20 > User username > Specifies the user name or ID that is used when running external > programs. The default is "lp". >=20 >=20 > Oleg. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --oj4kGyHlBMXGt3Le Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlvMImEACgkQQarn3Mo9 g1EkyhAAuXY7ObMZltDWHC9ybKhy+33GMB+4jl+qtMPzS1Pz/G8p7HWU2KD43AoC lffo4wWtZifKLvIpQAntK5t8OltvwFNfnWwpm2VRqaBuRNOWYj/lD4pXwKLbWoAo sGEOTvwVmqwsw6wZlXXiQjinIIl6GvTjMO2UCg3vvAhEfLlKgGjCXsrVKuKsZlni BOJI8DXo8an0FfYSEZEA6fqhojR7pnuQqP84wO81y3KkygptE/LdhDWcFfXaPvbw pnsV1Hfc51S3SyRwuF8xHJlkeMW6BXD9awCnL7pgDUI/p+GRfSGyadl24qgmLYoz t+9PqjJAkamQDZrcSIyMvKHD4cdN61uKWFu5opGFPsEIXNLCk+hCkz7N1FV26Cz1 kBhAaQf6+Hd/qHpF1lBL0yvSwcGsqbre5CWAzLXoN7Io1V6K7X6w2TSHacQ+eHWY m/4MEDZzEXhJ0UASl7ijLs/D81hKezdTHEYhmQ/bDqK13uWcxDsJ/nw+Qt/OKyDR iZ2dCJihWE09+/mC8JgTW73fTDVQgdjVjR08/6SXCc8R1AXFwAs9xnvhbMp9VjD2 S79WiRSQWqFjVO2jQBxG5fNEQY0ZHJqC9YTSW3sDmwkQG1JxIwE5jfbRRRxP4Azp CxhjmvFz7T2lB9o7s4zMEPQD9w8cpVDaqIwK08OHjFWmwwuMrzA= =I8ls -----END PGP SIGNATURE----- --oj4kGyHlBMXGt3Le--