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

Re: su -c "touch foo.txt" yields odd warning...



On Fri, 23 Mar 2001, Drew Bertola wrote:

> This seems odd:
>
> [root dev agile]# pwd
> /home/agile
> [root dev agile]# ls -ld
> drwx------   13 agile    agile        4096 Mar 23 19:35 .
> [root dev agile]# su -c "touch foo.txt" agile
> bash: /root/.bashrc: Permission denied
> [root dev agile]# ls -l foo.txt
> -rw-r--r--    1 agile    agile           0 Mar 23 19:35 foo.txt
>
>
> The command works, but the warning "bash: /root/.bashrc: Permission
> denied" doesn't make sense.  Any comments?

What's the version of bash?
Can you do "ls -l /root/.bashrc"?
Can you run "strace -f -o output.txt su -c "touch foo.txt" agile"
and then examine output.txt?

On bash 2.04.11(1)-release (rh7.0), looks ok.

simos.





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