2012-05-25 128 views
0

我有一個plone 4.1.4「UnifiedInstaller」zeo安裝在debian 5上,我想在集合中使用多個Data.fs。 recipe.filestorage。IOError:[Errno 13]權限被拒絕在Plone 4.1.4 zeo中使用collective.recipe.filestorage

我得到這個錯誤,當我啓動ZEO服務器:
IOError: [Errno 13] Permission denied: '/home/intranetcfa/intranetcfa/var/filestorage/vanilla/Data.fs.lock'

我的擴建:

parts = 
    filestorage 
    ... 

[filestorage] 
recipe=collective.recipe.filestorage 
blob-storage = var/blobstorage-%(fs_part_name)s 
location = var/filestorage/%(fs_part_name)s/Data.fs 
parts = 
    vanilla 

導致zeo.conf:

<filestorage vanilla> 
    path /home/intranetcfa/intranetcfa/var/filestorage/vanilla/Data.fs 
    blob-dir /home/intranetcfa/intranetcfa/var/blobstorage-vanilla 
</filestorage> 

和zope.conf :

<zodb_db vanilla> 
    cache-size 5000 
    <zeoclient> 
     blob-dir /home/intranetcfa/intranetcfa/var/blobstorage-vanilla 
     shared-blob-dir on 
     server 127.0.0.1:8102 
     storage vanilla 
     name vanilla_zeostorage 
     var /home/intranetcfa/intranetcfa/parts/client1/var 
     cache-size 30MB 

    </zeoclient> 
    mount-point /vanilla 
</zodb_db> 

回溯(最近通話最後一個):

File "/home/intranetcfa/buildout-cache/eggs/ZODB3-3.10.5-py2.6-linux-x86_64.egg/ZEO/runzeo.py", line 405, in <module> 
main() 
    File "/home/intranetcfa/buildout-cache/eggs/ZODB3-3.10.5-py2.6-linux-x86_64.egg/ZEO/runzeo.py", line 402, in main 
s.main() 
    File "/home/intranetcfa/buildout-cache/eggs/ZODB3-3.10.5-py2.6-linux-x86_64.egg/ZEO/runzeo.py", line 158, in main 
self.open_storages() 
    File "/home/intranetcfa/buildout-cache/eggs/ZODB3-3.10.5-py2.6-linux-x86_64.egg/ZEO/runzeo.py", line 207, in open_storages 
self.storages[opener.name] = opener.open() 
    File "/home/intranetcfa/buildout-cache/eggs/ZODB3-3.10.5-py2.6-linux-x86_64.egg/ZODB/config.py", line 177, in open 
return FileStorage(config.path, **options) 
    File "/home/intranetcfa/buildout-cache/eggs/ZODB3-3.10.5-py2.6-linux-x86_64.egg/ZODB/FileStorage/FileStorage.py", line 125, in __init__ 
self._lock_file = LockFile(file_name + '.lock') 
    File "/home/intranetcfa/buildout-cache/eggs/zc.lockfile-1.0.0-py2.6.egg/zc/lockfile/__init__.py", line 73, in __init__ 
fp = open(path, 'w+') 
IOError: [Errno 13] Permission denied: '/home/intranetcfa/intranetcfa/var/filestorage/vanilla/Data.fs.lock' 
+1

嚴格來說,這是一個http://serverfault.com類型的問題。 –

回答

2

var/filestorage/vanilla目錄不能由你的ZEO服務器運行的用戶寫入,或者你以前運行ZEO爲不同的用戶和Data.fs.lock文件時,它創建的不能由當前用戶寫入。

通過調整該目錄的權限,或者如果.lock文件存在,鎖定文件本身來修復此問題。

+0

當您將用戶安裝與由root運行的buildout混合時,通常會發生這種情況。如果構建腳本檢測到並切換到用戶來運行腳本,那將很酷。 – Yuri