2008/2/9, brianvandergaast <>:
> well, I need to produce a webpage that can have controls to
> delete/download/move files on the usb stick(on SBC) and have a
> control to shutdown the board. stuff like that.
The apache server usually runs as some strange user ("www-data" on this setup).
For file moving, it may be enough to chown the relevant directories on
your USB drive to that user, or it is formatted as a FAT volume, mount
it with the "-o uid=1234" option. where 1234 is the numeric user-id of
user www-data or whoever apache runs as)
For machine shutdown you're gonna need root, for which the least
dangerous thing would be a setuid root cgi program, such as a setuid
copy of "/sbin/halt" in your cgi-bin directory with an unguessable
name.
In any case, limiting the scope of the special powers as much as
possible would be prudent.
M
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|