[Discuss] really odd GCC bug? under Ubuntu
Bill Bogstad
bogstad at pobox.com
Sat May 11 16:56:53 EDT 2013
On Sat, May 11, 2013 at 1:50 PM, Richard Pieri <richard.pieri at gmail.com> wrote:
> Bill Bogstad wrote:
>> # chmod 0 /usr/local
>
> Yeah, that doesn't do what you think it does. It makes /usr/local
> unreadable but it doesn't make /usr/local/bin unreadable. Same for the
> rest of the subdirs under /usr/local. Which leads to permissions weirdness.
Pardon? That's not my understanding of Unix permissions. Note: I
didn't just turn off the
read permission on the directory. I also turned off the execute
permission (which in the case of directories
means you aren't even allowed to traverse them). Here's a quick demo
of the difference:
$ mkdir foo
$ mkdir foo/bar
$ chmod 111 foo
ls -lgd foo/bar
drwxr-xr-x 2 bogstad 4096 2013-05-11 16:54 foo/bar
$ chmod 0 foo
$ ls -lgd foo/bar
ls: cannot access foo/bar: Permission denied
$
Bill Bogstad
More information about the Discuss
mailing list