I've been using the great file-attr-restore script with rsync to get around problems with uid's on a portable hard drive... It's the perfect solution for me.
(for those that haven't seen it,you can get it here:
http://samba.org/ftp/unpacked/rsync/support/file-attr-restore
)
Anyway, I found a small bug in the script. file-attr-restore fails for file names with dollar signs. You might ask "why would you want to put a dollar sign in a file name?" The answer is you wouldn't, but Java creates these sorts of files when you compile a class that has inner classes (eg files like "outer$inner.class")
I created a little bash script that illustrates the problem:
----------------------------------------
#!/bin/bash
touch 'a$b'
chmod og-rw a?b
echo "State 0:"
ls -l a?b
# save permissions state to file
echo `find . -name "a?b" -ls` > findout
# change permissions
chmod a+rw a?b
echo "State 1:"
ls -l a?b
# attempt to restore
echo "Attempting to restore original permissions:"
file-attr-restore -p findout
echo "Results:"
ls -l a?b
----------------------------------------
It is probably an easy fix, but I don't know any perl. (Maybe I'll try anyway)
I was curious if this is a known bug... I couldn't find anything on rsync's bug list. But perhaps, there is a newer version out there.
Best,
Pat
-- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html