From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Pykhalov Subject: bug#33105: cups Can't create temporary file or stopped "Filter failed" Date: Sat, 20 Oct 2018 21:36:57 +0300 Message-ID: <87woqcea7q.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDw8W-0005hU-06 for bug-guix@gnu.org; Sat, 20 Oct 2018 14:38:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDw8Q-0007cN-OL for bug-guix@gnu.org; Sat, 20 Oct 2018 14:38:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:57414) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDw8Q-0007cF-Kv for bug-guix@gnu.org; Sat, 20 Oct 2018 14:38:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gDw8Q-0002QG-IF for bug-guix@gnu.org; Sat, 20 Oct 2018 14:38:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gDw7v-0004xw-Mm for bug-guix@gnu.org; Sat, 20 Oct 2018 14:37:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gDw7q-0007Qc-1R for bug-guix@gnu.org; Sat, 20 Oct 2018 14:37:31 -0400 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:44458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gDw7p-0007MK-QC for bug-guix@gnu.org; Sat, 20 Oct 2018 14:37:25 -0400 Received: by mail-pg1-x534.google.com with SMTP id w3-v6so1630242pgs.11 for ; Sat, 20 Oct 2018 11:37:10 -0700 (PDT) Received: from magnolia ([178.70.240.150]) by smtp.gmail.com with ESMTPSA id e3-v6sm35001633pgc.71.2018.10.20.11.37.06 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 20 Oct 2018 11:37:08 -0700 (PDT) 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: 33105@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Guix, 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 /v= ar/spool/cups/tmp/ is required to print a test page via CUPS WEB interface. 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: =2D-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 )))) =2D-8<---------------cut here---------------end--------------->8--- Maybe we should make /var/spool/cups/tmp directory owned by =E2=80=98lp=E2= =80=99 user, too? WDYT? Test page was printed successfully with: =2D-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 =2D-8<---------------cut here---------------end--------------->8--- From=20cups-files.conf(5) man page: TempDir directory Specifies the directory where short-term temporary files are stored. The default is "/var/spool/cups/tmp". User username Specifies the user name or ID that is used when running external programs. The default is "lp". Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAlvLdckACgkQckbhHGm3 lWnP5hAAkX/am+yKTOKUJagZnW1LhDN5PUr46ONAx25Te71/uFTWdwtCLC/dqrU5 SBZlqsFacohnNPpyGbPI0PJGeghe8f3dE1u7o/MKf0wk6/rJ37nAfy3wawAipKbF N8WzOpOMFlt8HzTFAena1F68zKOvFJfxvtcgYSU7SKi4DvXUizF77lTuyvkOXv0i lPuzP9iO8+8ki/iB5bantqB7Nz1BujGZxLvMpxg5XDZfWh24cQEKsXLhuWAvFd6x bLGYjTdiOgfXJVGKJWA9OueV1lNu6Z1PuEYAxCvjWiUOED5sF1NJGWDZto5vHJJs MTZRBkmQ9+qkIJgzJria5/45iJTHEcoh5YkpmgjnR0bgv6uZVRcC1YQmNlAOw1oF R3Y0v+v7DS0CXZrAfeOWFTH5e4Az40bcCHzIkRQuMQbFZ3hEmCcCGP/sux4qZpB8 05acpj+D7QzEf8aMRdf6Azhawvn7NqBigcsTOofAccOUfdtOoXioYskQCc5q3/ve AX1GEMnn8TLElqEWVa/IThrYGOoCZzVWtlljeVQqhOgEbgSGR8hFcN3RBsfbGrqF qUcslGAFo2rffFPwi1Dm8PJIERmWf3GaPZL18Zo2TSsQI5AoNcDbgtAwkIsqzzwW P5WMw6NWERei0PoGJrufZV/Pie2ykkCw7BP6ORHTGDnW2+Ttzt8= =IhwM -----END PGP SIGNATURE----- --=-=-=--