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

Re: why is sudo doing this?



On Thu, 21 Mar 2002, Sancho2k Lists wrote:

> sancho@molodetz:/home/ftpupload$ sudo echo "hello"
> hello
> sancho@molodetz:/home/ftpupload$ sudo echo "" >/var/log/ftpd
> bash: /var/log/ftpd: Permission denied
> sancho@molodetz:/home/ftpupload$ sudo echo "" >/var/log/xferlog
> bash: /var/log/xferlog: Permission denied
>
> I am unable to write to these files; my thinking is that while sudoing,
> as superuser, i should get no permission denied statements.  This is
> after providing my password for the first (echo) command.

Notice that bash is the program complaining.  The log files are being
opened by bash, not sudo.  So, you only have normal permissions when you
try to open them.  You need to su before trying to run that.


--
Ted, toll collector of the information superhighway