Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


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

[Discuss] really odd GCC bug? under Ubuntu



On Sat, May 11, 2013 at 5:11 PM, Richard Pieri <richard.pieri at gmail.com> wrote:
> Bill Bogstad wrote:
>> ls: cannot access foo/bar: Permission denied
>
> Precisely. You get a different error if the file is unreadable than you
> get when it doesn't exist:
>
> $ mkdir foo
> $ echo bar >foo/bar
> $ mv foo foo.old
> $ cat foo/bar
> cat: foo/bar: No such file or directory

I think I understand our misunderstanding.   You said:

> 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.

I thought you meant that /usr/local/bin can be "read" if the
/usr/local directory is not "executable".
This is clearly not the case.

What I now understand you to have meant is that there are different
error codes for "doesn't exist" and "you don't have permission" which
is certainly true.   Of course "you don't have permission" might mean
that you don't have permission
to even determine if the object exists, not that it exists; but
permissions on the object itself preclude your accessing it.
Directory vs. file permissions can be very important when hard links
allow the same file contents to be accessible in
different directories which might have completely different
permissions so I wanted to make sure that I understood what
you were saying.

In any case, I still don't think that GCC should treat those different
error codes differently, but they are certainly different and for
whatever reason it does.

Bill Bogstad



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org