Mick wrote:
On Tuesday 29 May 2007 22:04, Paul Varner wrote:
On Fri, 2007-05-25 at 20:14 -0700, maxim wexler wrote:
[EMAIL PROTECTED] ~ $ ls /
ls: cannot open directory /: Permission denied
[EMAIL PROTECTED] ~ $
What does 'ls -ld /' and 'ls -ld /etc' return?

Both of them should look like:
drwxr-xr-x 20 root root 4096 May 29 04:40 /
drwxr-xr-x 56 root root 4096 May 29 11:39 /etc

Oops! mine looks like this:

# ls -ld / drwxrwxrwt 22 root root 648 Apr 6 18:44 /

What's wrong here?

PS. I do not suffer from Maxim's problem, but clearly something is wrong with my access rights on the root directory?

Having root world-writeable looks a bit suspicious, especially if you don't remember doing it yourself. :)

The 't' bit on a directory just means that deletes in that directory are restricted to the superuser or file owner (as opposed to anyone with +w permissions to the directory). I'm not sure why that would affect sudo, or ls for that matter, unless it's something funny with how opendir() works?

You could try turning off the odd permsisions:

chmod o-wt /
chmod g-w /

and see if anything changes.

--
-- Mike

Still using IE? Get Firefox!
http://www.spreadfirefox.com/?q=affiliates&id=6492&t=1
--
[EMAIL PROTECTED] mailing list

Reply via email to