[Zope-CMF] GenericSetup creates exports with bad directory permissions

Maurits van Rees m.van.rees at zestsoftware.nl
Wed Mar 3 10:39:23 EST 2010


Hi,

Using a checkout of CMF.buildout/branches/zope212-cmf22 (or Plone
4.0a5 or latest from plone-coredev) I see that portal_setup generates
tarball exports where the permissions on directories are wrong: the
executable bit has not been set, so you cannot cd into that
directory.

This is with python 2.6, so there might have been changes to the
tarfile module that cause this.

yuppie, you did some changes in Products/GenericSetup/context.py on 13
December that might be related.  Does this behaviour ring a bell for
you?  Aha, if I revert to revision 106439, right before your changes,
the export goes fine, at least on my machine (Ubuntu Linux 9.04).

I can always open a bug report, but sometimes a mailing list works
faster.  At least it prompted me to try and revert some recent changes
to see if that helped.  :-)  https://bugs.launchpad.net/zope-cmf would
be the correct place for that, right?


Some details about the errors you can get:

With trunk, if I extract a tarball with all export steps from a fresh CMF Site,
this gives an error:

$ tar xzvf /home/maurits/download/setup_tool-20100303152012.tar.gz 
...
workflows.xml
workflows/default_workflow/
workflows/
workflows/default_workflow/definition.xml
tar: workflows/default_workflow/definition.xml: Cannot open: Permission denied

As you can see, the executable bit is indeed missing:

$ tar tzvf /home/maurits/download/setup_tool-20100303152012.tar.gz 
-rw-r--r--  contenttyperegistry.xml
-rw-r--r--  types.xml
drw-r--r--  types/
...
drw-r--r--  workflows/default_workflow/
drw-r--r--  workflows/
-rw-r--r--  workflows/default_workflow/definition.xml
drw-r--r--  workflows/singlestate_workflow/
-rw-r--r--  workflows/singlestate_workflow/definition.xml


Reverting to revision 106439, an export goes fine.  The big difference
is that directories are not explicitly included:

$ tar tzvf /home/maurits/download/setup_tool-20100303153258.tar.gz 
-rw-r--r--  contenttyperegistry.xml
-rw-r--r--  types.xml
-rw-r--r--  types/CMF_BTree_Folder.xml
-rw-r--r--  types/Discussion_Item.xml
-rw-r--r--  types/Document.xml
-rw-r--r--  types/Favorite.xml
-rw-r--r--  types/File.xml
-rw-r--r--  types/Folder.xml
-rw-r--r--  types/Image.xml
-rw-r--r--  types/Link.xml
-rw-r--r--  types/News_Item.xml
-rw-r--r--  cachingpolicymgr.xml
-rw-r--r--  actions.xml
-rw-r--r--  skins.xml
-rw-r--r--  skins/custom.xml
-rw-r--r--  catalog.xml
-rw-r--r--  mailhost.xml
-rw-r--r--  cookieauth.xml
-rw-r--r--  workflows.xml
-rw-r--r--  workflows/default_workflow/definition.xml
-rw-r--r--  workflows/singlestate_workflow/definition.xml
-rw-r--r--  componentregistry.xml
-rw-r--r--  toolset.xml
-rw-r--r--  properties.xml
-rw-r--r--  rolemap.xml


-- 
Maurits van Rees | http://maurits.vanrees.org/
            Work | http://zestsoftware.nl/
What are you going to create today?



More information about the Zope-CMF mailing list