现在用root运行,有一定的安全隐患,新建了一个普通用户用于运行seafile,结果运行出错,求解!
root@vps:/home/seafile/seafile-server-6.0.9# sudo -u seafile ./seahub.sh start-fastcgi
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub (fastcgi) at 127.0.0.1:8000 …
Traceback (most recent call last):
File “/home/seafile/seafile-server-6.0.9/seahub/manage.py”, line 10, in
execute_from_command_line(sys.argv)
File “/home/seafile/seafile-server-6.0.9/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/management/init.py”, line 354, in execute_from_command_line
utility.execute()
File “/home/seafile/seafile-server-6.0.9/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/management/init.py”, line 328, in execute
django.setup()
File “/home/seafile/seafile-server-6.0.9/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/init.py”, line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File “/home/seafile/seafile-server-6.0.9/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/apps/registry.py”, line 115, in populate
app_config.ready()
File “/home/seafile/seafile-server-6.0.9/seahub/seahub/base/apps.py”, line 11, in ready
cache.set(‘test_cache’, ‘worked’)
File “/home/seafile/seafile-server-6.0.9/seahub/thirdpart/Django-1.8.17-py2.7.egg/django/core/cache/backends/filebased.py”, line 52, in set
fd, tmp_path = tempfile.mkstemp(dir=self._dir)
File “/usr/lib/python2.7/tempfile.py”, line 308, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags)
File “/usr/lib/python2.7/tempfile.py”, line 239, in _mkstemp_inner
fd = _os.open(file, flags, 0600)
OSError: [Errno 13] Permission denied: ‘/tmp/seahub_cache/tmpyO65YA’
Error:Seahub failed to start.
PS:seafile.sh可正常启动,seahub.启动不了