2
1
I'm backing up a linux server to a windows share. I'm currently mounting the windows share with cifs and using rsync for incremental backups. File permissions and ownership are not being preserved, as should be expected after reading this samba document:
The core CIFS protocol does not provide unix ownership information or mode for files and directories. Because of this, files and directories will generally appear to be owned by whatever values the uid= or gid= options are set, and will have permissions set to the default file_mode and dir_mode for the mount.
How can I achieve my goal of preserving unix file permissions while writing to a windows share? Is there another network file system that would allow me to do this?
Thanks.
If I switched to a unix share and mounted it over NFS, would I have this issue? – getWeberForStackExchange – 2011-06-22T18:35:35.720
1@weberwithoneb: No. If the remote file system has POSIX permission abilities and you share it with NFS, you would not have this issue. – Caleb – 2011-06-22T18:36:41.173
1Furthermore, you wouldn't have to mount it at all however, rsync is capable of using several network protocols (it's own, ssh, etc) to send files. The real problem is that the target file system has to support permissions and magic like that. – Caleb – 2011-06-22T18:39:49.160
@Caleb: CIFS does support Unix permissions, and Windows has "Services for Unix" to add support for the extension. – user1686 – 2011-06-23T08:07:47.670
@grawity: Then by all means add another answer! (And I'll look into correcting mine.) That's something I didn't know about. – Caleb – 2011-06-23T08:09:31.433
@weberwithonb: I was wrong, I'd forgotten about MS's Services for Unix which adds the necessary capabilities to be compatible. You can mark @grawity's answer as correct!
– Caleb – 2011-06-24T07:20:54.843@Caleb: The latest version appears to be called Subsystem for UNIX Applications (the server side of which only comes with Windows 2k8 Server, unfortunately).
– user1686 – 2011-06-24T07:26:55.627