Operating System - HP-UX
1752318 Members
6231 Online
108786 Solutions
New Discussion юеВ

Re: 'pwd' command not working in a particular directory.

 
Dennis Handly
Acclaimed Contributor

Re: 'pwd' command not working in a particular directory.

>The /sapmnt/PEP is NFS filesystem which is exported from the same server. The original filesystem is /export/sapmnt/PEP. The pwd command is working fine if you go to the original filesystem.

Can you umount /sapmnt/PEP and then do "ll -d /sapmnt/PEP"?
If you don't have the right permissions on the mount point, bad things happen.

>as a root user the pwd command is working fine in the same directory.

This seems to point to the mount point permissions?

>Is it bug in 11.31?

Sounds like a sysadmin bug. :-)
N,Vipin
Frequent Advisor

Re: 'pwd' command not working in a particular directory.

host1:daaadm 2> cd /sapmnt/PEP/logs
host1:daaadm 4> /usr/bin/pwd
pwd: No such file or directory
host1:daaadm 5> echo $PATH
.:/home/daaadm:/usr/sap/DAA/SYS/exe/uc/hpia64:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/sec_mgmt/bastille/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/opt/perf/bin:/usr/contrib/kwdb/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/gwlm/bin:/opt/ignite/bin:/usr/local/bin:/opt/wlm/bin:/opt/hpnpl//bin:/opt/cfg2html:/opt/hp-gcc/bin:/opt/propplus/bin
host1:daaadm 6>

Only with csh shell this issue is happening.
N,Vipin
Frequent Advisor

Re: 'pwd' command not working in a particular directory.

> Can you umount /sapmnt/PEP and then do "ll -d /sapmnt/PEP"?

It is production box not possible to umount:(

> This seems to point to the mount point permissions?

We have another 3 nodes with same mount points and permissions. No issue with other nodes.

> Sounds like a sysadmin bug. :-)

lol
Dennis Handly
Acclaimed Contributor

Re: 'pwd' command not working in a particular directory.

>Only with csh shell this issue is happening.

The scummy C shell uses a different algorithm to find the CWD. It's lazy and just calls /usr/bin/pwd.

In a real shell try these:
pwd
pwd -P
/usr/bin/pwd

> It is production box not possible to umount:(

You might be able to use fire to fight fire.
I.e. if you can export / and mount it on another machine, you can then look at the permissions of /sapmnt/PEP mount point

They should be: dr-xr-xr-x 2 root root

Or even mount it back on itself:
# mkdir ROOT
# mount host1:/ $PWD/ROOT
# ll -d ROOT/sapmnt/PEP
(Then umount when done.)

>We have another 3 nodes with same mount points and permissions. No issue with other nodes.

How do you know without checking? You cloned the machines?
N,Vipin
Frequent Advisor

Re: 'pwd' command not working in a particular directory.

these are cluster nodes.

host1:/usr/bin#cmdo "ll -d /sapmnt/PEP"
## Executing on node host2:
drwxr-xr-x 18 pepadm sapsys 1024 Jul 11 16:09 /sapmnt/PEP
## Executing on node host4:
drwxr-xr-x 18 pepadm sapsys 1024 Jul 11 16:09 /sapmnt/PEP
## Executing on node host1:
drwxr-xr-x 18 pepadm sapsys 1024 Jul 11 16:09 /sapmnt/PEP
## Executing on node host3:
drwxr-xr-x 18 pepadm sapsys 1024 Jul 11 16:09 /sapmnt/PEP
host1:/usr/bin#cmdo "ll -d /export/sapmnt/PEP"
## Executing on node host2:
drwxr-xr-x 2 pepadm sapsys 96 Apr 3 2008 /export/sapmnt/PEP
## Executing on node host4:
drwxr-xr-x 2 pepadm sapsys 96 Apr 3 2008 /export/sapmnt/PEP
## Executing on node host1:
drwxr-xr-x 18 pepadm sapsys 1024 Jul 11 16:09 /export/sapmnt/PEP
## Executing on node host3:
drwxr-xr-x 2 pepadm sapsys 96 Apr 3 2008 /export/sapmnt/PEP
Deeos
Regular Advisor

Re: 'pwd' command not working in a particular directory.

hi



#whereis pwd

Deepak
N,Vipin
Frequent Advisor

Re: 'pwd' command not working in a particular directory.

host1:daaadm 9> whereis pwd
pwd: /usr/bin/pwd /usr/share/man/man1.Z/pwd.1
host1:daaadm 10>
KapilRaj
Honored Contributor

Re: 'pwd' command not working in a particular directory.

What is the permission of /sapmnt ? Can you post
ls -ld /sapmnt ?

Regards,

Kaps
Nothing is impossible
N,Vipin
Frequent Advisor

Re: 'pwd' command not working in a particular directory.

I did change the mount point permission to 777 and now it is wotking...

Thans to you all..