How to change the temporary file directory of a 1С:Enterprise server

When a 1C:Enterprise server is running on Linux, errors caused by 1C:Enterprise attempting to access files missing from the temporary directory may occur. This issue appears because a script cleans the temporary file directory. This article describes how to avoid this issue.

The variety of Linux distribution kits cannot give you a 100% guarantee that the following steps are applicable to all of them without any modification. However, the general idea stays the same. The steps given in this article are fully applicable to Fedora Core 4 and its analogs where bash is used as a command-line shell.

The default temporary file directory is /tmp. It is processed by scheduled runs of the /etc/cron.daily/tmpwatch script, which deletes files that have not been accessed for a long time.

To eliminate the issue, you have to change the temporary file directory of 1C:Enterprise server /tmp/.usr1cv82). To change the directory, add the following lines to the .bash_profile file, which is located in the home directory of the user on whose behalf the 1С:Enterprise server runs:

TMPDIR=/tmp/.usr1cv82
export TMPDIR

NOTE 

You can use any directory as a temporary file directory. Ensure that the user on whose behalf the 1С:Enterprise server runs has the right to write to this directory.

To apply the changes, restart the 1С:Enterprise server.

Then exclude the directory from the list of directories processed by the tmpwatch utility, which is started automatically by the OS job scheduler.

In the /etc/cron.daily/tmpwatch script, modify the line that processes the /tmp directory by adding the parameter indicating that the directory should be skipped. Example:

/usr/sbin/tmpwatch -x /tmp/.usr1cv82 240 /tmp

NOTE 

If you choose a directory that is not processed by tmpwatch, you do not have to change the script.

Next page: Kerberos authentification setup example for the Linux version of 1С:Enterprise server

Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.