diff -Naur a/contrib/mc-wrapper.csh.in b/contrib/mc-wrapper.csh.in
--- a/contrib/mc-wrapper.csh.in	2024-08-08 13:49:18.000000000 +0600
+++ b/contrib/mc-wrapper.csh.in	2024-08-25 08:34:15.121295453 +0600
@@ -3,7 +3,7 @@
 if ($?TMPDIR) then
 	setenv MC_PWD_FILE $TMPDIR/mc-$MC_USER/mc.pwd.$$
 else
-	setenv MC_PWD_FILE /tmp/mc-$MC_USER/mc.pwd.$$
+	setenv MC_PWD_FILE /var/tmp/mc-$MC_USER/mc.pwd.$$
 endif
 
 @bindir@/mc -P "$MC_PWD_FILE" $*
diff -Naur a/contrib/mc-wrapper.sh.in b/contrib/mc-wrapper.sh.in
--- a/contrib/mc-wrapper.sh.in	2024-08-08 13:49:18.000000000 +0600
+++ b/contrib/mc-wrapper.sh.in	2024-08-25 08:34:03.489374384 +0600
@@ -1,5 +1,5 @@
 MC_USER=`whoami`
-MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$"
+MC_PWD_FILE="${TMPDIR-/var/tmp}/mc-$MC_USER/mc.pwd.$$"
 @bindir@/mc -P "$MC_PWD_FILE" "$@"
 
 if test -r "$MC_PWD_FILE"; then
diff -Naur a/lib/unixcompat.h b/lib/unixcompat.h
--- a/lib/unixcompat.h	2024-08-08 13:49:18.000000000 +0600
+++ b/lib/unixcompat.h	2024-08-25 08:35:59.689585879 +0600
@@ -108,7 +108,7 @@
 #define PATH_SEP_STR "/"
 #define IS_PATH_SEP(c) ((c) == PATH_SEP)
 #define PATH_ENV_SEP ':'
-#define TMPDIR_DEFAULT "/tmp"
+#define TMPDIR_DEFAULT "/var/tmp"
 #define SCRIPT_SUFFIX ""
 #define get_default_editor() "vi"
 #define OS_SORT_CASE_SENSITIVE_DEFAULT TRUE
