in reply to Opening Files and File / Directory Permissions

In general under Unix, you must have at least write and execute permissions on the directory to create a file in that directory. Usually you also want read access on the directory as well, esp if you want to list it out.

In fact, I'm surprised your 'ls -al' even listed any files at all since if you don't have execute permissions to the current directory you should not be able to list it (i.e. I can't get it to work on either AIX or Mac OSX). What OS are you on?

You do not need to have execute permissions on the file itself to read or write it, just read or write permissions respectively.

  • Comment on Re: Opening Files and File / Directory Permissions

Replies are listed 'Best First'.
Re^2: Opening Files and File / Directory Permissions
by awohld (Hermit) on Aug 24, 2005 at 16:49 UTC
    I was logged in a root when I did "ls -l", that's why it worked.