Re: [Zope] Local File System (LocalFS) install problems
J. Atwood writes:
(I have searched the newsgroups and zope.org)
I downloaded and installed LocalFS (untar in zope dir) restarted Zope (2.1.6 on Linux running as Nobody). The Local File System is an available object but when I try to add it to any folder I get..
Error Type: IOError Error Value: [Errno 13] Permission denied: '/usr/local/zope/lib/python/Products/LocalFS/methodAdd.dtml' The error message is puzzling.
I would expect that your file system is not accessible by the user "Nobody". However, I would not expect the get the error value: '/usr/local/zope/lib/python/Products/LocalFS/methodAdd.dtml'. Maybe, this is the (Zope) object that got the IOError. Dieter
(thanks to Jonathon and Dieter... for the permissions problem. That did the trick) Again, after some searching, I am looking for the syntax to write a file / append to a file in a Local File System. This is certainly where my Python days seem to slow my down b/c I would have just: contents = open('/path/file.txt', "r") to read and contents = open('/path/file.txt', "a") to append. I am sure that I am missing some bit of Zope Zen here... Please point me in the right direction... J
Again, after some searching, I am looking for the syntax to write a file / append to a file in a Local File System.
This is certainly where my Python days seem to slow my down b/c I would have just:
contents = open('/path/file.txt', "r")
to read and
contents = open('/path/file.txt', "a")
to append.
I am sure that I am missing some bit of Zope Zen here...
Please point me in the right direction...
To write a new file you would use the manage_upload method. To append a file, you could read the contents of an existing file, append your data, then call manage_upload to overwrite the file. See the LocalFS/DTML faq at http://www.zope.org/Members/jfarr for information on how to access the contents of a local file. You may also consider just using an external method to do what you're trying to accomplish. --jfarr
participants (3)
-
Dieter Maurer -
J. Atwood -
Jonothan Farr