找不到可用的临时目录

11 浏览
0 Comments

找不到可用的临时目录

我正试图找到一个临时目录,但是当我尝试使用tempfile.gettempdir()获取目录时,它给我返回了错误:

 File "/usr/lib/python2.6/tempfile.py", line 254, in gettempdir
    tempdir = _get_default_tempdir()
  File "/usr/lib/python2.6/tempfile.py", line 201, in _get_default_tempdir
    ("No usable temporary directory found in %s" % dirlist))
IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/home/openerp/openerp-server']

该目录的权限为777,属于root所有。

0