Operating System - HP-UX
1832350 Members
2588 Online
110041 Solutions
New Discussion

Re: Can't get into current working directory

 
SOLVED
Go to solution
Dieter Degrendele_1
Frequent Advisor

Can't get into current working directory

Dear all,

I have a nasty problem on one of my servers. We use a very old database called unidata. This database is installed on a MCSG cluster. On one node it runs fine but as soon as I switch to the failover node, users cannot start the program (udt). They get the error "cannot get current working directory". The strange thing is that I do not have this problem when I logon as root.

The disks between the two nodes are mirrored, thus the mounted volumes are the same. The /etc/passwd, /etc/profile and /etc/group files are identical on both servers.

Does anybody have a suggestion where I have to look?

Thanks in advance.

DD
The possible we did, the unpossible we're doing but for a miracle you have to wait some time.
10 REPLIES 10
A. Clay Stephenson
Acclaimed Contributor

Re: Can't get into current working directory

Hi:

Almost certainly your problem is with the mountpoint permissions. You will need to umount the filesystem in question and then look at the permissions of the mountpoint itself. I'll bet the permissions are very restrictive eventhough those of the mounted filesysystems are fine.
If it ain't broke, I can fix that.
melvyn burnard
Honored Contributor

Re: Can't get into current working directory

first thing to do is identify when did thos start happening, and see if anything has changed in the meantime.
Next thing, compare the environment, home directories etc on both systems.
This looks like a user config issue on the suspect node.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Justo Exposito
Esteemed Contributor

Re: Can't get into current working directory

Hi Dieter,

I look for the permits on the working directory for the user, the environment variables, .profile and the permits in the mount point directories.

Hope this help,

Justo.
Help is a Beatiful word
Dieter Degrendele_1
Frequent Advisor

Re: Can't get into current working directory

I already checked if the mount points permissions were identical. This is OK.

Now I found out that the owner of the home directory of these users was set to root on the failing node. It could be that this was the problem, but I'm still not 100% sure. The hard thing is that the system has to be up and running 22h a day, thus I can test the failover only tomorrow.

P.S. Does somebody know what the udt command does? (the command to logon to the database?).

P.S. Does somebody have a good test using the getcwd() command?


Thanks and regards,

DD
The possible we did, the unpossible we're doing but for a miracle you have to wait some time.
A. Clay Stephenson
Acclaimed Contributor

Re: Can't get into current working directory

Hi:

The attached small 3 minute C program should
do the test for you. It will compile with the Bundled C compiler.

cc +DAportable getcwd.c -o getcwd

You should then cd to whatever directory as a regular user. Execute getcwd. If sucessfull, it will print the cwd on stdout and exit with status 0 otherwise an error message will print to stderr and the exit status will indicate the error.

Regards, Clay
If it ain't broke, I can fix that.
Dieter Degrendele_1
Frequent Advisor

Re: Can't get into current working directory

Thanks Clay,

This is what I was looking for (I guess).

I'll keep in touch tomorrow after 15.30 CET.

The possible we did, the unpossible we're doing but for a miracle you have to wait some time.
Dieter Degrendele_1
Frequent Advisor

Re: Can't get into current working directory

Thanks Clay,

With the getcwd command I could figure out that normal users did have no permissions on the / filesystem.

Apparently an external consultant changed it.

Regards,

DD
The possible we did, the unpossible we're doing but for a miracle you have to wait some time.
Sanjay_6
Honored Contributor

Re: Can't get into current working directory

Hi Dieter,

Check the permissions for the directory. The user who is trying to get into this directory should have read and execute permission (atleast) for this directory.

Hope this helps.

Regds
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Can't get into current working directory

Hi Dieter:

I'm glad you got things going. I hope you didn't do something really dangerous and open up / or other directories to simply 777. Give them no more permissions on these directories that is needed.

Regards, Clay
If it ain't broke, I can fix that.
Dieter Degrendele_1
Frequent Advisor

Re: Can't get into current working directory

Of course I didn't give 777.

Problem solved, case closed.


Regards,
DD
The possible we did, the unpossible we're doing but for a miracle you have to wait some time.