Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find error (permission issue?) makes bsync terminate #7

Open
ceremcem opened this issue Apr 22, 2014 · 4 comments
Open

Find error (permission issue?) makes bsync terminate #7

ceremcem opened this issue Apr 22, 2014 · 4 comments
Labels

Comments

@ceremcem
Copy link

I'll dig when I have time:

Loading filelists...
Old filelist not found. Starting with empty history.
find: `ceremcem/httpd/ceremcem.net/ağkökü/phpmathpublisher/doc': Permission denied
find: `ceremcem/httpd/ceremcem.net/ağkökü/phpmathpublisher/doc_fr': Permission denied
Find Error in ceremcem/

Permission may be denied, but sync must keep going on as much as possible.

@dooblem
Copy link
Owner

dooblem commented Apr 22, 2014

At first I thought it was the correct behaviour, and I coded it this way : you expect bsync to make both directories exactly identical, so if any read error occur it should fail.

But I'm thinking it again, and it will probably be ok if bsync just ignores unreadable files/dirs.

I'll take a look at that.

For now, as a workaround you can add a .bsync-ignore file at the root of your directory (see in the README).

@ceremcem
Copy link
Author

I'm deleting the file (in most cases if I can not solve the issue via setting appropriate permissions, that is because it's a special file) or setting appropriate permissions/ownership as a workaround. I think bsync should write down original permissions to an "after sync jobs" file, change the permissions, complete sync, change permissions to the original state.

@dooblem
Copy link
Owner

dooblem commented Apr 27, 2014

You mean being able to sync directories if the user removed himself the permissions? Hum.. this would be a complicated task. Even rsync is not syncing this way.

I made a patch in a new branch. You can try it here:
https://raw.githubusercontent.com/dooblem/bsync/nostrict/bsync

The run will continue even if there is find errors to get file lists, or to make the snapshots, or if there are rsync errors.

I may add it as an option later.

Note that this will work and ignore new files/dirs added if they do not have the correct permissions.
However, in existing synced directories, if you remove permission on a directory, all files bellow that dir will be considered as deleted. You'll have to check carefully before accepting the sync.

Working around this is hard because bsync would have to parse the stderr of gnu find. For now I see no clean and easy way to do that.

@dooblem
Copy link
Owner

dooblem commented May 31, 2014

Let me know if you test my branch...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants