From owner-freebsd-stable@FreeBSD.ORG Wed Sep 17 07:05:24 2014 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB2FBA46; Wed, 17 Sep 2014 07:05:24 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C8BE8C2; Wed, 17 Sep 2014 07:05:22 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA23590; Wed, 17 Sep 2014 10:05:21 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XU9Im-0008tO-Ks; Wed, 17 Sep 2014 10:05:20 +0300 Message-ID: <54193273.6080709@FreeBSD.org> Date: Wed, 17 Sep 2014 10:04:19 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Hans Petter Selasky , freebsd-stable List , FreeBSD Current Subject: Re: Fwd: usb printer vs cups References: <54133325.9070302@FreeBSD.org> <5419238E.8050708@FreeBSD.org> <5419285D.8020909@selasky.org> In-Reply-To: <5419285D.8020909@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: freebsd-desktop@FreeBSD.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2014 07:05:25 -0000 On 17/09/2014 09:21, Hans Petter Selasky wrote: > On 09/17/14 08:00, Andriy Gapon wrote: >> >> Soliciting help. >> >> -------- Forwarded Message -------- >> >>> From my experience I think that cupsd executes backend tools with all uids and >> gids set to cups and no supplementary groups. In the case of USB printers the >> backends need to access /dev/usbctl and /dev/usb/foobar that corresponds to a >> printer. That means that the access to those devices must be somehow granted to >> cups:cups. >> How do people solve this? What kind of permissions / configuration do you use? >> >> P.S. >> Maybe I over-generalized the issue to all USB printers. My personal experience >> is with an HP printer handled by hplip / hplip-plugin. >> > > Hi, > > The /usr/ports/print/cups-base should be updated. > > The pkg-message should not say that: > > > # FreeBSD 8.x > add path 'usb*' mode 0770 group cups > add path 'ugen*' mode 0660 group cups > > add path 'usb/0.2.*' mode 0660 group cups > > Is needed. This is wrong. > > Instead make cups-base install the attached devd configuration file in > /usr/local/etc/devd/ which does the needed chown for printers only. The problem is that my printer does not work if I also do not change permissions on /dev/usbctl. But I do not really want /dev/usbctl to be owned by cups as there can be other services / users that need access to usbctl. Is there anything smarter than mucking with device ownership? In other words, I have no problem granting cups user or group a full access to all USB devices. I have a problem with changing owner or group of USB devices to cups, because that interferes with other accesses to those devices. -- Andriy Gapon