plone / ansible.plone_server

Ansible role to create a plone server
Other
9 stars 16 forks source link

Limit the chmod in setpermissions to files owned by plone_buildout #152

Closed djowett closed 3 years ago

djowett commented 3 years ago
plone_buildout won't have permission to chmod anything else, so this
stops a load of useless error messages

Helps with #82, though may not be a full fix.

djowett commented 3 years ago

Output is like this - perhaps a bit too verbose? But better than a stack load of errors for sure.

# Make sure anything we've created in var is r/w by our group, but no-one else
find  /var/local/plone-5.1/mysite -user plone_buildout -exec chmod -v ug+rwX,o-rwx {} \;
find  /var/local/plone-5.1/backups/mysite -user plone_buildout -exec chmod -v ug+rwX,o-rwx {} \;
chmod -v 754 /usr/local/plone-5.1/mysite/bin/*
mode of '/var/local/plone-5.1/mysite/client3' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client3/import' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client4' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client4/import' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/filestorage' retained as 2770 (rwxrws---)
find: ‘/var/local/plone-5.1/mysite/.python-eggs’: Permission denied
mode of '/var/local/plone-5.1/mysite/client2' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client2/import' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client_reserved' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client_reserved/import' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/zeoserver' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client1' retained as 2770 (rwxrws---)
mode of '/var/local/plone-5.1/mysite/client1/import' retained as 2770 (rwxrws---)
mode of '/usr/local/plone-5.1/mysite/bin/activate' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/activate.csh' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/activate.fish' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/activate_this.py' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/backup' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/buildout' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/client1' changed from 0755 (rwxr-xr-x) to 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/client2' changed from 0755 (rwxr-xr-x) to 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/client3' changed from 0755 (rwxr-xr-x) to 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/client4' changed from 0755 (rwxr-xr-x) to 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/client_reserved' changed from 0755 (rwxr-xr-x) to 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/easy_install' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/easy_install-2.7' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/pip' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/pip2' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/pip2.7' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/python' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/python-config' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/python2' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/python2.7' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/repozo' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/restore' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/snapshotbackup' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/snapshotrestore' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/update_locale' changed from 0755 (rwxr-xr-x) to 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/wheel' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/zeopack' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/zeoserver' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/zipbackup' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/ziprestore' retained as 0754 (rwxr-xr--)
mode of '/usr/local/plone-5.1/mysite/bin/zopepy' retained as 0754 (rwxr-xr--)
djowett commented 3 years ago

Rebased on top of #153 - intending that be merged first