>> #!/bin/sh
>>
>> file1=${1-/mnt/kernel/temp}
>> user=hanneke
>>
>> # Now execute a suid program by some other user.
>> su $user -c date > $file1
Rogier> What do you expect?
Rogier> The file gets opened by the shell here, and gets written to by
Rogier> $user. That might fail on NFS, indeed.
No. This is quite normal behaviour. In fact, the 2.0 kernel behaves
correctly, as do other unices.
Rogier> Use
Rogier> su $user -c "date > $file1"
Rogier> or something like that to let $user open the file.
This is different from what I want. Here the file is created and written to
by $user. And of course that works fine.
However, I want a file to be created by one uid, and then write to it by
another uid. Just as the script suggests.
-- ---------------------------------------------------------------------- telephone: +31 33 455 85 84 Tasking Software BV fax: +31 33 455 10 05 P.O. Box 899 email: kees_bakker@tasking.com 3800 AW Amersfoort WWW: http://www.tasking.com The Netherlands ---------------------------------------------------------------------- ----- Quality Development Tools Worldwide ----- ----------------------------------- Does anybody know what's going on?- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html