您的默认临时目录似乎具有错误的权限。这里我有
$ 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