Hi, I have installed Zope 2.1.6 in Red Hat Linux 6.2 box. I followed the How-To installing and Upgrading Zope 2.x. No problems expect when I try to run a method of a Python Class that is used as Z base class. My method works fine with the python interpreter. However when I tried it within Zope i get Error Value: [Errno 13] Permission denied I have been trying many things to solve this problem (changing permissions of the directory i want to accesss to, of the module, ...). What is the right thing to do? It has surely more to do with the Unix permissions but i don't know to solve this problem. Here is what i have done. #### My base class: #### in /usr/local/zope/lib/python/Products/BaseStore/BaseStore.py #### -rw-rw-r-- 1 root root 1273 Apr 14 15:37 BaseStore.py class BaseItem: def import_properties(self, path): """Import properties and other attributes from a file system folder. path is the folder path. """ file_names = os.listdir(path) #... ------------^--------the guilty #etc. #### in Zope: B is an instance of ZClass which subclasses CatalogAware, BaseItem, ObjectManager and Folder. #### in the same folder as B i have a test method with: <dtml-var "B.import_properties('/home/oscar/xenata/mz')"> .... #### When I try to view my test Zope method i get: [Zope] Zope Error Zope has encountered an error while publishing this resource. Error Type: OSError Error Value: [Errno 13] Permission denied ... Traceback (innermost last): File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /usr/local/zope/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 165, in publish File /usr/local/zope/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: test) File /usr/local/zope/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: test) File /usr/local/zope/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: test) File /usr/local/zope/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: test) File /usr/local/zope/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval (Object: B.import_properties('/home/oscar/xenata/mz')) (Info: B) File <string>, line 0, in ? File /usr/local/zope/lib/python/Products/BaseStore/BaseStore.py, line 17, in import_properties (Object: CatalogAware) OSError: (see above)
Hi Oscar, Oscar Picasso wrote:
Hi, I have installed Zope 2.1.6 in Red Hat Linux 6.2 box. I followed the How-To installing and Upgrading Zope 2.x. No problems expect when I try to run a method of a Python Class that is used as Z base class.
My method works fine with the python interpreter. However when I tried it within Zope i get
Error Value: [Errno 13] Permission denied
I have been trying many things to solve this problem (changing permissions of the directory i want to accesss to, of the module, ...). What is the right thing to do? It has surely more to do with the Unix permissions but i don't know to solve this problem.
Here is what i have done.
#### My base class: #### in /usr/local/zope/lib/python/Products/BaseStore/BaseStore.py #### -rw-rw-r-- 1 root root 1273 Apr 14 15:37 BaseStore.py
You are probably starting zope as root also. So zope considers to change euid to nobody in this case. Eventually the directory in question is not xr- in the case. HTH Tino Wildenhain
On 20 Apr 2000 05:00:01 -0500, Tino Wildenhain wrote:
Hi Oscar,
[...]
You are probably starting zope as root also. So zope considers to change euid to nobody in this case. Eventually the directory in question is not xr- in the case.
(associated) Last time I checked, ZServer didn't handle group permissions correctly with setuid(), at least on Solaris. If files are restricted to owner and group, you have to setuid to owner or change file ownership.
I *think* Brian Lloyd checked in a change to the startup machinery so that it now sets gid correctly during startup. If this isn't in recent releases, it will definitely be in the next. On 24 Apr 2000 kent@tiamat.goathill.org wrote:
On 20 Apr 2000 05:00:01 -0500, Tino Wildenhain wrote:
Hi Oscar,
[...]
You are probably starting zope as root also. So zope considers to change euid to nobody in this case. Eventually the directory in question is not xr- in the case.
(associated)
Last time I checked, ZServer didn't handle group permissions correctly with setuid(), at least on Solaris. If files are restricted to owner and group, you have to setuid to owner or change file ownership.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Chris McDonough -
kent@tiamat.goathill.org -
Oscar Picasso -
Tino Wildenhain