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

Re: A question on setting setuid bit



On Tue, Jul 04, 2006 at 08:37:52PM -0400, LEE, Yui-wah (Clement) wrote:
> I am building a package in which one of the binary has
> to have the setuid and setgid bits set.  I wonder which
> one of the following two is the more appropriate method
> to use?
> 
> 1. Use "install -m 6755 <file> <dir>" in the install
>    target of the Makefile.
> 
>    However, I already tried this method and it did not
>    work.  The "install" program that I am using is part
>    of the GNU coreutils.  I could not find any specific
>    confirmation that the setuid and setgid bits
>    (i.e. the first digit "6" in the numeric mode
>    "6755") can be used with the install program (the
>    document says only that the -m switch works "as in"
>    chmod).
> 
> 2. Add a "chmod ug+s" command in the postinst script.

3. Use dpkg-statoverride in your postinst script. 

regards
fEnIo
-- 
  ,''`.  Bartosz Fenski | mailto:fenio@debian.org | pgp:0x13fefc40 | irc:fEnIo
 : :' :       32-050 Skawina - Glowackiego 3/15 - malopolskie v. - Poland
 `. `'           phone:+48602383548 | proud Debian maintainer and user
   `-          http://skawina.eu.org | jid:fenio@jabber.org | rlu:172001

Attachment: signature.asc
Description: Digital signature


Reply to: