Lost Read permission on my folder

Hi
I am a normal user on a HP-UX system which is meant for a large group.

There are few directories which I think i am owner of. (Name of these directories is same as my username, and I usually have all the permissions in these directories).

I was trying to give read and execute permission to everyone to one of my directory but strangly I lost read permission myself.

This is the sequence of commands and the message the shell gave me back.

command:cd /adhoc/decisionlf_out1/pzx2v9
command:cd ..
command: chmod -r 755 pzx2v9 
shell output:chmod: can't access 755
 
command: chmod -R 755 pzx2v9 
shell output:chmod: can't traverse pzx2v9/
 
command: chmod -R 755 pzx2v9/
shell output:chmod: can't traverse pzx2v9/
 
command: cd pzx2v9
command: ls
shell output: . unreadable
 
command: cd ..
command: ls -lrt

(attached is the printscreen output)

Then I tried follwing

command: chmod -R 777 pzx2v9/
shell output: chmod: can't traverse pzx2v9/
 

So the question is - how I lost my read permission and how can i get it back.
Thanks in Advance
Grvs

This is the command which did the damage. It actioned the -r (Remove Read Permisssions) parameter on the directory pzx2v9 .
You need a root user to type the reverse command:

chmod +r pzx2v9
Here is an example of what happened and how to reverse the change:
ls -lad ABC
drwxr-xr-x   2 root       sys           8192 Apr 26 16:08 ABC

chmod -r ABC
ls -lad ABC
d-wx--x--x   2 root       sys           8192 Apr 26 16:08 ABC

chmod +r ABC
ls -lad ABC
drwxr-xr-x   2 root       sys           8192 Apr 26 16:08 ABC
1 Like

Thanks methyl !

I tried

chmod +r dirname  

myself and it worked for me :).
Also I think i got it now.

command

chmod -r 755 pzx2v9

interprets that I want to change permissions for two directories, it changed it for the one it could.

1 Like