[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: brightd



On Thu, Apr 26, 2007 at 02:55:35PM +0200, Evgeni Golov wrote:
> > * Do not change file permissions in postinst, unless you do it with
> >   dpkg-statoverride. In this case, given that what you want are
> >   standard execute permissions for a binary, you just need to do it
> >   when packaging. Which is already happening, in the call to
> >   dh_fixperms. This will leave your postinst empty, so just remove it.
> 
> Hm, could you explain that a bit more? I need the binary setuid-root,
> so $USER is able to write to /sys/class/backlight/
> I previously used install -M 4755 in debian/rules, but this did not
> work, because I don't build as root : (

Oh, ok. Well, packages *need* to be built as root, precisely so that
they can have any set of needed ownerships and permissions. You can
use fakeroot to do the build.

If, however, you really need to set the permissions in the postinst
(say, if you were to have the binary setgid to a group without a
static gid) you still need to take care, because the user might have
changed the permissions and you don't want to override them.

Take a look at the discussion and example in policy 10.9 and 10.9.1:
http://www.debian.org/doc/debian-policy/ch-files.html#s10.9

-- 
Rodrigo Gallardo
GPG-Fingerprint: 7C81 E60C 442E 8FBC D975  2F49 0199 8318 ADC9 BC28

Attachment: signature.asc
Description: Digital signature


Reply to: