Re: Behavior of mdadm depending on user

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

 



On Mon, 2007-07-02 at 21:10 -0500, Michael Schwarz wrote:
> This ia just a couple of quick questions.
> 
> I'm charged with developing a prototype application that will assemble and
> mount a hot-swapped drive array, mount it, transfer files to it, unmount it,
> and stop the array. And it is an application delivered by a local webserver
> (don't ask).
> 
> I don't want to do any of the incredibly stupid acts of making madadm and
> mount/umount setuid root, nor do I want to run the webserver as root.
> 
> Instead, I took the slightly less stupid approach of invoking madadm and
> mount/umount with a hardcoded C application that is setuid root. (We can
> debate the stupidity of this -- I know it isn't best, but it is fast and less
> stupid than the alternatives presented above).

This isn't really an answer to your question, but isn't this an ideal
application for sudo? Make a shell script with the mdadm command(s) you
want. And set it up so apache or whatever your web server runs as able
to run your shell script as root without authentication. 

Ian
-- 
Ian Dall <ian@xxxxxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux