Operating System - HP-UX
1832650 Members
2820 Online
110043 Solutions
New Discussion

Re: strange ls and pwd error

 
SOLVED
Go to solution
Steve Post
Trusted Contributor

strange ls and pwd error

I telnet into hpux11 and cd to a directory. I have been there a while. Previously, the ls and pwd commands worked fine. Now, when I type these commands I get ". not found". I DO have rwx permission all the way down to to the directory I am in. I am not logged in as root, but the files in this directory were created by the SAME user that can't see them.
The directory I am in is.....
/usr/ud/redback/server/redback/rgw/log.

Any ideas????
Steve post
12 REPLIES 12
Thierry Poels_1
Honored Contributor

Re: strange ls and pwd error

sorry, it sure sounds like an "access denied" problem.

Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Vincenzo Restuccia
Honored Contributor

Re: strange ls and pwd error

Check $HOME/.profile etc. with /etc/skel.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: strange ls and pwd error

This does sound like a permission problem but there is one other thing that can cause really wierd problems. Do you have another filesystem mounted below /usr? Often the permissions of the mountpt directory will be very restricted
e.g. 700 and owned by root. If you then examine the permissions of the mounted filesystem as root everything looks fine. Unmount the filesystem and examine the mountpoint directory's permissions.
If it ain't broke, I can fix that.
Steve Post
Trusted Contributor

Re: strange ls and pwd error

Permissions: /usr/ud/redback was 700, BUT it is owned by redback. I changed it to 777 just in case.
Profile: I ran diff /home/redback/.profile /etc/skel. No difference.
I checked permission on /usr/ud directory. It's 777. But /usr/ud IS the mount point. I'll unmount the bugger, and see if there are any strange things underneath for /usr/ud.
Thierry Poels_1
Honored Contributor

Re: strange ls and pwd error

hi again,

go to the root directory (/),
and then go down one directory at a time.
This should eventually show where the problem is.
good luck,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Steve Post
Trusted Contributor

Re: strange ls and pwd error

yeah I know
ls -ld /
ls -ld /usr
ls -ld /usr/ud
ls -ld /usr/ud/redback
......
ls -ld /usr/ud/redback/server/redback/rgw/log
mode is 777.
This is the FIRST thing I did.
Thierry Poels_1
Honored Contributor

Re: strange ls and pwd error

ooops long toes?
hmmmz, you mentioned 'ls' or 'pwd' failing, from which point on to they fail in this directory structure?
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Steve Post
Trusted Contributor

Re: strange ls and pwd error

No long toes ^_^. Text doesn't tell you how loud my voice is. (ha ha). But your question is hitting the nail on the head. At what directory is my login sitting at? It WAS at /usr/ud/redback/server/redback/rgw/log. But now it is confused. It is like I can see the tree, but I can't tell what branch I am standing on.
ls -l . < . not found >
ls -l /usr/ud/u....log < I get a listing >.
James R. Ferguson
Acclaimed Contributor

Re: strange ls and pwd error

Hi Steve:

Clay is on the right track. I've experienced this kind (or similar) problem before.

Follow his advice. Unmount the filesystem, verify, and change any directory permissions you need to do, then re-mount the filesystem.

...JRF...
Thierry Poels_1
Honored Contributor

Re: strange ls and pwd error

that's what I wanted to hear, Steve :)
at this point I think the magical answer has been given : umount, chmod, mount ...
good luck
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Steve Post
Trusted Contributor

Re: strange ls and pwd error

Alright folks. I unmounted and remounted. I fixed the permision on /usr/ud/redback from 700 to 777 (I know it's really open, but it is to eliminate that possibility). I also ran fsck on /dev/vgtrf/lvol1 just in case.
I ran dmesg and checked /var/adm/syslog/syslog.log. I ran find /usr/ud -type l -exec ls -ld {} \; just in case there was a goofy link messing something up. It's working now.
Now only time time will tell if it is fixed.
Thanks.
STeve
Steve Post
Trusted Contributor

Re: strange ls and pwd error

The problem is SOLVED. It was a RED HERRING!
The start and stop programs for this application were renaming the log directory, then creating a new log directory under my nose! ...with the SAME files!

I would have never noticed it except I was in the log directory when it moved. I was in it a lot. But I don't really think it is a good idea move a directory while someone is using it. It's like standing on a rug, and pulling on the rug REAL HARD.
Thanks for the help. And remember "ls -il"

Steve P. ^_^