Patrick Marquetecken wrote:
>>Haim Ashkenazi wrote:
>>
>>
>>>Your problem seems to be in CMFPhoto. somehow it tries to list files in
>>>'/root' and it fails because it doesn't have permissions. either it's a
>>>configuration problem, or it's a bug (I see that both zope and plone
>>>you've installed are testing versions).
>>
>>If this is a clean install, why would CMFPhoto be looking for stuff in
>>/root (which would need LocalFS or something; makes sense to store lots
>>of photos on the OS filesystem)?
>>
>>Patrick: are you transfering a Data.fs from a previous Zope/Plone
>>instance?
>>
>>Kirk
>>--
>>gentoo-user@gentoo.org mailing list
>>
> 
> No its a clean install.

Well, then the question is, why is CMFPhoto looking in /root? It's no
surprise it doesn't have the permissions.

Ok, let's look at the source and try to puzzle it out:

>   File "/var/lib/zope/zope-2.7.6/Products/CMFPhoto/Photo.py", line 20, in ?
>     from imageengine import isPilAvailable, isConvertAvailable
>   File "/var/lib/zope/zope-2.7.6/Products/CMFPhoto/imageengine.py", line 46, 
> in ?
>     isConvertAvailable = findConvert()
>   File "/var/lib/zope/zope-2.7.6/Products/CMFPhoto/imageengine.py", line 35, 
> in findConvert
>     if convert in [ entry.lower() for entry in os.listdir(path) ]:
> OSError: [Errno 13] Permission denied: '/root'

CMFPhoto is initializing and wants to know if there is a conversion
program available, so it looks along the system path. The error is
evoked with the code:

>      23 def findConvert():
>      24     """try to find the convert utility in the search path
>      25     """
>      26     if sys.platform == 'win32':
>      27         convert = 'convert.exe'
>      28     else:
>      29         convert = 'convert'
>      30
>      31     envPath = os.environ['PATH']
>      32     syspath = [p for p in envPath.split(os.pathsep) ]
>      33     for path in syspath:
>      34         if os.path.isdir(path):
>      35             if convert in [ entry.lower() for entry in 
> os.listdir(path) ]:
>      36                 LOG('CMFPhoto', DEBUG, 'ImageMagick found', 'The 
> ImageMagick \
>      37 convert tool was found at %s in your search path.' % path)
>      38                 return True
>      39
>      40     LOG('CMFPhoto', PROBLEM, 'ImageMagick not found', 'The 
> ImageMagick \
>      41         convert tool wasn\'t found in your search path: %s' % envPath)
>      42     return False

The problem is in line 35. Evidently "/root" is in the search path
(lines 31-32). Is "/root" in your environment? ('echo $PATH') It
shouldn't be. Executables should not be kept there. That's what
/usr/local is for.

I just checked the ebuild for CMFPhoto, and ImageMagick is not required.
So it looks like the search path is the real problem. It should not be
looking for '/root'. If '/root' is in the search path, remove it.

If '/root/' is not in your $PATH, then, as I see it at this point,
you've got two choices:

1. using zprod-manager and remove CMFPhoto from the instance. then
restart zope and see if you get any new error messages. Do this if you
need Plone up more than CMFPhoto.

or

2. *temporarily* change permissions on /root to get zope up and running
and then look at the CMFPhoto configuration; change the default
directory and then change the /root permissions back to what they were.

Since it's quick I would do (2) and then if that didn't work, go to (1).

HTH,

Kirk
--
"Good boy, Dex!"
  -- Joseph "Sky Captain" Sullivan
-- 
gentoo-user@gentoo.org mailing list

Reply via email to