Re: chmod 111

From: Joshua Hudson
Date: Fri Mar 17 2006 - 13:09:56 EST


On 3/17/06, Nick Warne <nick@xxxxxxxxxxx> wrote:
> Hi All,
>
> First, I apologise if this isn't a kernel question, but I think it is related.
>
> Slackware 10 base, 2.6.15.6
>
> I am normal user, in groups users and wheel. Why can I do this:
>
>
> nick@linuxamd:nick$ which ls
> /usr/bin/ls
> nick@linuxamd:nick$ ls -lsa /usr/bin/ls
> 0 lrwxrwxrwx 1 root root 12 2004-07-22 22:52 /usr/bin/ls -> ../../bin/ls
> nick@linuxamd:nick$ cd /bin
> nick@linuxamd:bin$ sudo chmod 111 ls
> nick@linuxamd:bin$ ls -lsa ls
> 76 ---x--x--x 1 root bin 72608 2004-03-16 02:08 ls
>
>
>
> I shouldn't be able to execute 'ls' as I can't read it, shouldn't it?
>
> Nick

You have x permission, you can execute. That's the rules.
Now a shell script, ...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/