Operating System - HP-UX
1833758 Members
2877 Online
110063 Solutions
New Discussion

Cannot chdir to /var/news

 
Nago
Advisor

Cannot chdir to /var/news

I get this message at the point of logging on to my HP-UX server:
HP-UX diam2 B.11.00 U 9000/800 (tc)
login: klaxcut
Password:
Please wait...checking for disk quotas
Cannot chdir to /var/news

diam2:/place/oracle8>

I cannot run SAM on the server.
Please assit me to resolve this problem. Thanks.
24 REPLIES 24
Sridhar Bhaskarla
Honored Contributor

Re: Cannot chdir to /var/news

Hi,

/var/news should be readable by others as it is checked through /etc/profile. Make sure the permissions are at a minimum of 755 with bin as the owner.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
James R. Ferguson
Acclaimed Contributor

Re: Cannot chdir to /var/news

Hi:

Make sure that there are execute (and read) permissions on '/var/news' for the owner, group and others.

Regards!

...JRF...
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

see the file permissions set for /var/news.
by issuing "cd /var ", "ls -l | grep news" commands.

Issue "df -k" command and ensure /var is not full.
"Let us fine tune our knowledge together"
Paul Sperry
Honored Contributor

Re: Cannot chdir to /var/news

Sounds like file permissions.

# ls -ald news
drwxrwxrwx 2 bin bin 96 Jul 20 2003 news
Steven E. Protter
Exalted Contributor

Re: Cannot chdir to /var/news

/var filesystem may not be mounted.

mount /var

If you get an error other than already mounted, work from there.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Helen French
Honored Contributor

Re: Cannot chdir to /var/news

If you find the permission is set right and if you don't want the "news" command to be executed when that user logs in, then remove the entry from it's $HOME/.profile file or from the /etc/profile(global removal) file.

# man news
Life is a promise, fulfill it!
Nago
Advisor

Re: Cannot chdir to /var/news

/var does not show on doing bdf or df -k.

issuing #mount /var gives the following message:
rootdiam2[]mount /var
vxfs mount: /dev/vg00/lvol8 is already mounted, /var is busy,
or allowable number of mount points exceeded
rootdiam2[]
I had a power outage yesterday and the system crashed. Who knows if that is the problem, though in the past the system could crash but nothing harmful will be noticed. Please your kind attention is solicited.
Helen French
Honored Contributor

Re: Cannot chdir to /var/news

It can be a problem with the file system then, like you said after a system crash. What you need to do is:

# bdf

If /var doesn't come up, then check:
# cd /var
# ls -la

If nothing comes up, your LV is not mounted. You now need to do an 'fsck' on the file system:

# fsck /dev/vg00/lvol8
# mount /dev/vg00/lvol8 /var

If fsck fix all problems reported, then you can mount the file system and you will be good to go.
Life is a promise, fulfill it!
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

Just issue the mout command and see the output.
If it includes "/var" then it is already mounted. If not, you may issue the command "mountall" which will try to mount the file systems that are not yet mounted.

any how, if you can do "cd /var" and see the subfolders in it, then you have to check the file permission set for news folder.
"Let us fine tune our knowledge together"
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

Just issue the "mount"command and see the output.
If it includes "/var" then it is already mounted. If not, you may issue the command "mountall" which will try to mount the file systems that are not yet mounted.

any how, if you can do "cd /var" and see the subfolders in it, then you have to check the file permission set for news folder.
"Let us fine tune our knowledge together"
Helen French
Honored Contributor

Re: Cannot chdir to /var/news

Also, make sure that lvol8 is the correct LV that needs to be mounted on /var. If it's mounted on something else, then you need to find out which LV should be mounted on /var from:

# cat /etc/fstab | grep var
Life is a promise, fulfill it!
Nago
Advisor

Re: Cannot chdir to /var/news

If I do bdf, /var does not show. but if I do cd /var, this is what I see:

diamx:/>cd /var
diamx:/var>ls
adm dt spool stm
core rbootd statmon tombstones
diamx:/var>

I think a lot of files are missing in it or something is just wrong. SAM and news are not there and some other files too.
see d result below for fstab:

rootdiamx[var]cat /etc/fstab |grep var
/dev/vg00/lvol8 /var vxfs delaylog 0 2
rootdiamx[var]

K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

Do

# fsck /dev/vg00/lvol8

and try to fix the filesystem problems if any

"Let us fine tune our knowledge together"
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

Try "umount /var" till the time you get the message /var is already unmounted message.Do "fsck /dev/vg00/lvol8" and then mount it only once using
"# mount /dev/vg00/lvol8 /var "
"Let us fine tune our knowledge together"
Nago
Advisor

Re: Cannot chdir to /var/news

i think i should take the option of umount and the fsck.
i have my oracle database running and users are connected. does it matter if I do umount and do fsck while users are running oracle?
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

You will not be able to unmount now. You should not unmount it when your system is being accessed by users and DB is running.

You may have to shut the DB and tell the users to log out before unmounting it.

I think you will not be able to unmount the system in multiuser mode, if so boot it in single user mode and do fsck and mounting operations or use "fuser -k /var".
"Let us fine tune our knowledge together"
Nago
Advisor

Re: Cannot chdir to /var/news

comparing the /var area on the problem server diamx and another working server
diamv, i get the following:

---diamv
diamv:/var>ls
X11 lost+found preserve spool tombstones
adm mail rbootd statmon uucp
cde_report2 news run stm yp
dt opt sam tmp
diamv:/var>

---diamx
rootdiamx[var]ls
adm dt spool stm
core rbootd statmon tombstones
rootdiamx[var]

Each of these directories; sam, tmp, run, news all have something in them lookign at diamv.
That means files must be missing or are they hidden somewhere?
Pls help.

i have my oracle database running and users are connected. does it matter if I do umount and do fsck while users are running oracle?
Helen French
Honored Contributor

Re: Cannot chdir to /var/news

You won't be able to umount /var in this condition as the file system will be busy (being used by running processes). You can shutdown the system, boot in single user mode, check the file system and boot in multi user mode.
Life is a promise, fulfill it!
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

Issue "ls -la" and see if it makes any difference in file listing.Mostly may not.
"Let us fine tune our knowledge together"
Bill Hassell
Honored Contributor

Re: Cannot chdir to /var/news

Someone may have created additional /var mountpoints (such as /var/news) and this filesystem may not be mounted. You can look in /etc/fstab to see if any mountpoints are listed but not mounted, or (as root) just mount everything and look for error messages:

mount -a

Ignore the errors about already mounted and look for errors where /var/news (or something similar) cannot be mounted--run fsck. That is likely the problem. Note that if the system seems to be running OK, then /var is indeed mounted since a missing /var breaks just about everything in HP-UX.


Bill Hassell, sysadmin
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

I feel most of the time the /var/news folder is alway blank.

So you may just create this folder "news" under /var .
"Let us fine tune our knowledge together"
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

It's time to sigout for me! Sorry!
"Let us fine tune our knowledge together"
K.Vijayaragavan.
Respected Contributor

Re: Cannot chdir to /var/news

Can you post the latest status of this problem?
"Let us fine tune our knowledge together"
Nago
Advisor

Re: Cannot chdir to /var/news

I have scheduled to carry out the correction exercise this friday. we cannot afford a downtime of the server before then. after the exercise, I'd update the forum. Thanks a great deal.