您的默認臨時目錄似乎具有錯誤的權限。這裏我有
$ ls -ld /tmp
drwxrwxrwt 22 root root 4096 2011-06-10 09:17 /tmp
關鍵部分是'大家'可以讀取或寫入。你也需要這個。它當然是可以包含子目錄。
您是否在運行AppArmor或SE Linux?
編輯2011-07-21:正如有人只是認爲有必要downvote這個答案 - help(tempfile)
是什麼樣的價值觀tmpdir
很清晰(臨時文件或目錄的默認目錄)嘗試:
By default, 'tmpdir'
will be the directory given by 'tempdir()'
. This will be a subdirectory of the temporary directory found by the following rule. The environment variables 'TMPDIR'
, 'TMP'
and 'TEMP'
are checked in turn and the first found which points to a writable directory is used: if none succeeds '/tmp'
is used.
所以我的錢是在檢查這三個環境變量。但AppArmor和SELinux在某些發行版上也顯示出問題。
如果你已經用你的方式來回答這個問題,向下滾動到最後一個關於磁盤空間 – 2013-11-12 06:24:22
yup的答案。磁盤空間是我的問題 – eyaler 2014-03-06 06:16:54