PDA

View Full Version : Will a permission change trigger a file copy?


Derekasaurus
04-27-2009, 02:26 AM
I recently discovered that my music, video, and image files had inconsistent permissions. I fixed these inconsistencies from the command line, usually by doing something like this:

find . -name "*.mp3" -exec chmod 644 {} \;

Of course I'm sure that SD will synchronize these permission changes to my external drives one way or another when I do my next Smart Update, but I'm wondering if SD will just sync the permissions or copy the whole file? The former should be a very quick update, while the latter will move hundreds of GB of data in my case.

chmod doesn't seem to update the timestamp, so I assume SD can differentiate metadata changes (like permissions, extended attributes, and ACLs) from actual data changes and not copy the whole file if the content hasn't changed.

It's not worth going into the specifics, but the answer to this question may have some impact on my backup strategy, and I'd rather get an official answer rather than running a Smart Update and guessing what SD is doing based on how long it takes.

Thanks.

dnanian
04-27-2009, 06:53 AM
We'll recopy the entire file on a Smart Update or Copy Different.

Derekasaurus
04-27-2009, 11:18 AM
Not the answer I was expecting. Is that by design or because there's no way for SD to differentiate between a true edit and a metadata change (like altered file permissions)? On the surface it seems wasteful to copy a large file just because of a permission change.

dnanian
04-27-2009, 11:37 AM
It's a rare enough case that we didn't optimize for it.