Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cwRsync ignores "nontsec" on Windows 7

I use cwRsync to sync up some file from Windows to Ubuntu. This process used to work fine on Vista, but since I upgraded to Windows7, I keep getting permission issues.

Some background... I did use to get the same permission issues on Vista, but that was resolved by using the CYGWIN=nontsec environment variable.

The premission problem

rsync: failed to modify permissions on xxx: Permission denied (13)

Since windows and UNIX file permissions differ, sync'ing files with windows permissions doesn't make sense. What rsync does is set the permission on the UNIX side to 0 (d---------). To prevent this, cygwin has the nontsec variable which instructs it to ignore the windows file permissions.

The problem is, on Windows7, nontsec appears not to have any effect.

like image 878
anushr Avatar asked Jan 23 '10 18:01

anushr


2 Answers

re your solution, I had to make an adjustment to see it work for me - instead of your etc/fstab content, I used this content from the forum topic you reference:

none /cygdrive cygdrive binary,posix=0,user,noacl 0 0

I'm using cwRsync installer 4.0.3. I'm happy enough that it works for me but I can't offer a reason why, not being familiar enough with fstab syntax and options. Hopefully it adds something useful to someone else.

like image 192
Raise Avatar answered Oct 12 '22 04:10

Raise


I figured out that it wasn't Windows 7 that was causing the issue. Rather, it was the new version of cwrsync that was ignoring the nontsec environment var. For cwRsync versions higher than 1.7, you need to use the noacl option. (see forum topic: No access to subfolders of RSYNC backup folder)

The solution involves creating an fstab file with the noacl option:

# In this example, my cwRsync dir is located at: "C:/Program Files (x86)/cwRsync"
# Filename: "C:/Program Files (x86)/cwRsync/etc/fstab"
C:/Program\040Files\040(x86)/cwRsync / ntfs override,binary,noacl 0 0
C:/Program\040Files\040(x86)/cwRsync/bin /usr/bin ntfs override,binary,noacl 0 0

And that's it! You can also remove the CYGWIN=nontsec env var since it's no longer used.

like image 2
anushr Avatar answered Oct 12 '22 04:10

anushr