RE: Error -922
Posted in 1998
---------- From: Jeff Raihanan[SMTP:nbhc@teleport.com] Sent: Tuesday, January 27, 1998 9:46 AM To: informix-list@rmy.emory.edu Subject: Error -922 Version: Informix SE 5.0 Platform: SCO OpenServer 5.0.4 (Unix) I can't figure out why I keep getting error -922 (cannot get name of current working directory). Presumably because the directory permissions somewhere in the directory hierarchy are not set correctly. The details vary depending on exactly who you are, but generally, 'others' need read and execute (search) permission on all the directories from root down to where the database directory will be created. If you don't have those permissions, then something will fail. This is necessary because the sqlexec process runs with the effective GID set to Informix, If the home directory is NFS-mounted, then the fact that sqlexec also runs some of the time with effective UID set to root means that it cannot necessarily do anything, because root-access gets mapped to user 'nobody'. I created a new user account (permission is 644 on files and 755 on home directory). Ownership and group is set properly. Connect privileges have been granted to the new user. What are the permissions on the directory containing the home directory. Are the directories on an NFS-mounted file system. When I try to access the database, I get the -922 error. This isn't the first time this has happened. It seems to occur whenever I create a new account or new subdirectory within an account. Somehow, I eventually find a way to work around it (deleting and recreating the login directory worked once before, but not this time). The funny thing is that I can cd to the /tmp directory and access the database just fine. That's normal; everyone has rwx permission on /tmp. I can cd into another user's home directory and access the database from the new account just fine too. If the other user can access the database, then the setup is OK; the new account is not setup OK and causes problems. Last week, this happened when I created a subdirectory from a user's home directory. In the subdirectory, I got the -922 if I tried to run isql. In the parent directory, isql worked just fine. The permissions for the sub and parent directories are IDENTICAL. Now, here's the weird part: IF I RENAMED THE SUBDIRECTORY TO AN EXISTING USER, IT WORKED FINE. AS SOON AS I RENAMED IT BACK, I GOT THE -922. I couldn't believe what I was seeing, so I did this several times. (In this real-life example, parent directory is /u/nbhc (nbhc has DBA privileges). When subdirectory was /u/nbhc/tiff, I got -922. When it's /u/nbhc/tiffany, I don't get -922 (tiffany is one of our user accounts). When I set it back to /u/nbhc/tiff, the -922 came back. When I changed the name again to /u/nbhc/wendy (wendy is an account too), it worked again.) All the directories have the same permissions. Unless I saw the permissions on each and every directory from root downwards, I won't attempt to interpret what you saw. I'd also need to know what the real and effective UID and GID of the person running the commands are. I'd also want to see the permissions on the path leading to $INFORMIXDIR. Can anyone tell me why I get this error and what I can do to fix it? Thanks very, very much in advance for your help.