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

Re: sudo and globbing



On Mon, 3 Feb 2003, Harry Putnam wrote:

> I didn't notice anything in man sudo to explain why globbing doesn't
> work using sudo.  At least in this instance
> 
> as root
>     ls /root/inst*
>   /root/install.log  /root/install.log.syslog
> 
> as user
> 
>     sudo ls /root/inst*
>   ls: /root/inst*: No such file or directory

Hi Harry,

it works.  But the command line is expanded when you issue it, and at that
time you are still a regular user and don't have privileges to read /root.
If otherwise, it would be a hole to read the contents of a directory a 
regular user doesn't has read permission for.

Cheers,

Michael





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