[Gllug] sudo and more interesting commands
Amias Channer
gllug at amias.org.uk
Fri Jul 2 11:42:26 UTC 2004
On Fri, 02 Jul 2004 12:33:01 +0100
Tom Taylor <ttaylor at fotango.com> wrote:
> scenario is I want to run a command like ...
>
> $ echo foo > bar
>
> as a normal user where bar is a file writable only by root. Using
> sudo I would try ...
>
> $ sudo echo foo > bar
>
> but that wouldn't work as only echo is being run as root, nor can I
> use a sub shell ... what can I do to sudo a command that is more
> complicated that <command> [args]??
quote it ? sudo 'echo foo > bar '
Making sure that root's bar is the same as the normal user's bar
Toodle-pip
Amias
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list