[ale] to sudo or not to sudo

leam hall leamhall at gmail.com
Thu Jan 26 10:16:29 EST 2012


So you ran the script as you, it is owned by you and not SUID or SGID, and
had something like:

sudo /usr/bin/dostuff
touch /tmp/myfile

And /tmp/myfile was owned by root? Oddness, it should have been owned by
you. Maybe check if there's a -c option to sudo to run just that one
command?

Leam

On Thu, Jan 26, 2012 at 10:07 AM, John Pilman <jcpilman at gmail.com> wrote:

> On Thu, Jan 26, 2012 at 9:58 AM, leam hall <leamhall at gmail.com> wrote:
> > I think so, but try it. write the script with a sudo, and then a line
> > afterwards  "touch /tmp/myfile". See who owns /tmp/myfile.
>
> OK, I tried and it is owned by root.
> ...John
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
Mind on a Mission <http://leamhall.blogspot.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20120126/6a5484be/attachment.html 


More information about the Ale mailing list