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

A question on setting setuid bit


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"

2. Add a "chmod ug+s" command in the postinst script.



Reply to: