"Cannot delete non-empty directory"/"Operation not permitted" with file-creation on target-server
carsten.deibert at gmx.net
Wed Jul 14 01:35:59 MDT 2010
I was searching for an answer myself for quite some time without success, so
I hope somebody can clarify...I use rsync to sync webcontent from one server
* Apache runs as nobody:nogroup.
* Source-Server-Rights htdocs: The rsync-user gains access via o+rx
* Destination-Server-Rights htdocs: The rsync-user is in the group
'nogroup', gains access via owner rsync-user and g+rwx, htdocs-group is
I use the following command:
/usr/bin/rsync -topglrcze ssh --delete --force --exclude='example.zip'
/vol/www/example/htdocs/ user at destination-server:/vol/www/example/htdocs/
This works fine except in the following scenarios:
1. On the destination-server in e.g. /vol/www/example/htdocs/test there
already is an 'example.zip' --> I will receive the following error: "cannot
delete non-empty directory". I tried to overcome this with a rsync-filter,
but without success. How can I use the exclude-pattern even if such an
excluded file exists on the destination server ?
2. Whenever the Apache-Process of the destination server writes in its
webfolder (e.g. /vol/www/example/htdocs/test/example.htm with
nobody:nogroup) the rsync-user, even has full rights via 'nogroup', will
give me an "Operation not permitted" wth the next synchronisation.
In both cases the problem seems not to be about file or folder rights, it's
about having files on the destination-server, which weren't synced from the
Any help greatly appreciated, thanks.
More information about the rsync