Operating System - HP-UX
1834485 Members
3394 Online
110067 Solutions
New Discussion

Re: ls -la result is unreadable

 
SOLVED
Go to solution
Yap Yen Nee
Contributor

ls -la result is unreadable

Hi,
We are running HP-UX 11i here. I faced a strange thing when I did a ls -la under a particular directory. In this directory, when I type ls -la, i got the following result:-

. unreadable

Why is it unreadable? Could it be the permission problem or what? Please advise.
5 REPLIES 5
Victor Fridyev
Honored Contributor

Re: ls -la result is unreadable

Hi,

Can it be that .unreadable is a file name?
In any case, in order to check, run
ls -lab in tha directory .


HTH
Entities are not to be multiplied beyond necessity - RTFM
bhavin asokan
Honored Contributor
Solution

Re: ls -la result is unreadable

hi,

it is purely a permission problem.
the directory is not having read permission for either the user/group/other but having write and execute permissions

go to its parent directory.
add read permission by chmod command
chmod u+r dirname
or

chmod g+r dirname

or
chmod o+r dirname

regds,
Muthukumar_5
Honored Contributor

Re: ls -la result is unreadable

Directory read permission is not given to that logged user.

change the permission as chmod +rw. It will work now.

HTH.
Easy to suggest when don't know about the problem!
bhavin asokan
Honored Contributor

Re: ls -la result is unreadable

hi,

if the directory having only execute permission also this can happen.that time you will be able to go to directory.but you will not be able to list or create files in that directory.

if you are having both write and execute permission ,you can go to that dir,can create or view files in that dir,but you will not be able to list files.this can be used as a security feature also.the users who knows the file name can only edit or view the file.others will not be able to do,as they will not be able to know the file name by listing

regds,
Tor-Arne Nostdal
Trusted Contributor

Re: ls -la result is unreadable

Just a small tip:
If you want to change to read permission on an entire directory structure (recursive change) you could use the command:
chmod -R ugo+r ./directoryname

Directories should also have execute x permission, to allow to execute commands in the directory
find . -type d -exec chmod ugo+x {} \;

In the above examples I assume that all users (owner=u, group=g and other=o) should have access. Substitute to appropriate rights. And if needed adjust the /etc/group file.

/2r
I'm trying to become President of the state I'm in...