man cannot create temp file

Posted on 2002-05-01
Last Modified: 2013-12-27
Ever since I put /var on a mirror, man cannot create a temp file.  I have made sure perms were 1777 on /var/tmp.  I don't know what else to check...

Here is the specific error:
# man vi
Reformatting page.  Please Wait...nroff: cannot create temp file.

System info:

# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d0       7001819   73245 6858556     2%    /
/dev/md/dsk/d6       10910828  933614 9868106     9%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/md/dsk/d2       12965730   39760 12796313     1%    /var
swap                 7611880      16 7611864     1%    /var/run
swap                 7611912      48 7611864     1%    /tmp

# cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options

fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -

/dev/md/dsk/d0  /dev/md/rdsk/d0 /       ufs     1       no      -
/dev/md/dsk/d1  /dev/md/rdsk/d1 -       swap    -       no      -
/dev/md/dsk/d2  /dev/md/rdsk/d2 /var    ufs     1       no      -
/dev/md/dsk/d6  /dev/md/rdsk/d6 /usr    ufs     1       no      -

swap    -       /tmp    tmpfs   -       yes     -

This is the ls -l of /var/tmp
drwxrwxrwt   2 root     other        512 Apr 30 16:11 tmp
Question by:pshirmey
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
LVL 40

Expert Comment

ID: 6984124
Where the temp file is located depends on whether the man page was formatted with roff or sgml. The Solaris man pages are sgml and temp files for those will be placed in /tmp by default. The roff formatted documents will have their temp files in /usr/tmp (which is normally a symlink to /var/tmp). So check to see that /tmp is mode 1777 and that it is owned by root:sys

Author Comment

ID: 6984153
Here is /tmp

drwxrwxrwt  10 root     sys          695 May  1 14:11 tmp

Author Comment

ID: 6984162
Here is /tmp

drwxrwxrwt  10 root     sys          695 May  1 14:11 tmp
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 6984242
the symlink for /usr/tmp went to ../var/tmp.  which did not work since /var is now on a different file system.  After changing the link to /var/tmp it worked.

But now that raises another ?, all of my other links to ../var/* are now broken.

I guess short of changing them all, I should move /usr to the same mirror as /var.


Author Comment

ID: 6984420
Well, I just changed them all.. There were only about 15 of them...
LVL 40

Expert Comment

ID: 6986391
It shouldn't have mattered that the links pointed to ../var/tmp as long as tmp is a subdir of var. From the filesystem view going up one dir from /usr takes you to / and /var is there.

The only thing that seems logical to me is that something was cached. When you moved the contents of /var to a separate filesystem did you do so in single user mode?

Author Comment

ID: 6986987
No I was not in single user mode when I copied it...

So by redoing all the symlinks, do you think it should be good now...
LVL 40

Accepted Solution

jlevie earned 50 total points
ID: 6987043
Yes, that's okay and now I understand what happened.

When moving something like /var (or some of it's contents) it's really important to do so in single user mode. For some other areas or file systems you can safely do it in multi-user mode if you can be certain that nothing has any of the files in that area open. Obviously, if you are moving a file system from one disk to another you can umount the source disk and re-mount it on a temporary mount point while doing the transfer. However, /var will always have open files when the system is in multi-user mode.

If you haven't done so since moving /var, I highly recommend a reboot of the server to be certain that everything is reading/writing to where /var is now. Anything that had an open file on the old /var hirearchy could well still be reading/writing to that area since the process would have the inodes of the file(s) in the file structure of the program.

Author Comment

ID: 6987137
I have rebooted and everything seems good...  But since this system is still virginal, I will probably rebuild it and do the var and usr movement in single user.  Thanks for all your help!
LVL 40

Expert Comment

ID: 6987174
Those things in /var that are suspect are just log files, tmp files, etc. If the system isn't in production I doubt that you'd have lost any data that you will care about. So I see no point in going through all of the effort to rebuild.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
unix scripting question 1 118
Linux :how to provide sudo access to the user 13 126
Best way to split and output to csv in bash 2 81
Martian Packets Unix 5 83
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question