Hi,

I want to create a wiki page from a python Program. Following the
documentation I managed to do that as the user running the webserver.
However I want to run this program as a different user.
Whenever I do this I get a permissions error:

====
>>> request = ScriptContext()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/web/contexts.py", line 439, in __init__
wsgiapp.init(self)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 51, in init
context.lang = setup_i18n_preauth(context)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 233, in setup_i18n_preauth
i18n.i18n_init(context)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/i18n/__init__.py", line 72, in i18n_init
meta_cache = caching.CacheEntry(request, 'i18n', 'meta', scope='wiki', use_pickle=True)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/caching.py", line 71, in __init__
self.arena_dir = get_arena_dir(request, arena, scope)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/caching.py", line 32, in get_arena_dir
return os.path.join(request.cfg.cache_dir, request.cfg.siteid, arena)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/web/contexts.py", line 56, in get
res = obj.environ.setdefault(self.name, factory(obj))
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/web/contexts.py", line 128, in cfg
cfg = multiconfig.getConfig(self.request.url)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/config/multiconfig.py", line 193, in getConfig
cfg = _makeConfig(cfgName)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/config/multiconfig.py", line 125, in _makeConfig
cfg = configClass(name)
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/config/multiconfig.py", line 277, in __init__
self._check_directories()
File "/share/cc_wiki/moin_cc/lib/python2.6/site-packages/MoinMoin/config/multiconfig.py", line 604, in _check_directories
raise error.ConfigurationError(msg)
MoinMoin.error.ConfigurationError:
data_dir "/share/cc_wiki/moin_cc/share/moin/data" does not exist, or has incorrect ownership or
permissions.

Make sure the directory and the subdirectory "pages" are owned by the web
server and are readable, writable and executable by the web server user
and group.

It is recommended to use absolute paths and not relative paths. Check
also the spelling of the directory name.
====

/share/cc_wiki/moin_cc/share/moin/data exists and is writable by the apache user but not by the user running the script.

Version is 1.9.4

regards, Andreas

--
Vorstandsvorsitzender/Chairman of the board of management:
Gerd-Lothar Leonhart
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Michael Heinrichs, 
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Philippe Miltin
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196