I am running the latest version of Copssh and cwRsync and when using Public Key Authentication I am getting the following error:
@ERROR: setgid failed
rsync error: error starting client-server protocol (code 4) at main.c(1635) [sender=3.1.0]
Could someone point me in the right direction as I canot seem to find what is causing this error. I have already done a fresh install and am still getting this error.
Thanks
Check if your service account has required user rights. Pay special attention to SeCreateTokenPrivilege. It seems that there may be some group policies removing it.
I have verified that all user rights are correct and that no Group Policiy is overriding them. Based on the SSH logs it does appear that the User is able to connnect via SSH and looking more into this I think I was able to narrow this down to a rsync issues as in my rsyncd.log file I found the following error:
rsync: setgid 0 failed: Invalid argument (22)
Below is the commands I am running on the client computer to run the backup:
SET SECHAW_IDENTITY="C:\Program Files\cwRsync\ssh_key"
SET SECHAW_TYPE=ssh
SET SECHAW_LOCALPORT=9119
SET SECHAW_SERVER=backup.server.com
SET SECHAW_SERVERPORT=873
SET SECHAW_USER=SvcCWRSYNC
SET SECHAW_CMD="C:\Program Files\cwRsync\bin\rsync.exe" -vrtz --delete "(backup path)" rsync://user@localhost:9119/user/computer
SET SECHAW_TUNNEL=ssh -p 65535 -i /ssh_key -L 9119:127.0.0.1:873 user@backup.server.com -T -N
"C:\Program Files\cwRsync\bin\sechaw.exe" --delay 30
Any other thoughts?
Does the service account have write permission on the target directory ? Did you run -Prep a dir for Upload- wizard ?
Yes the RSYNC service account does have write permission on the target directory. I did also attept to run the -Prep a dir for Upload- wizard but it cannot process the entire folder due to some of the folder/files being longer then the 255 Character Limit.
--Update-- I have also tried creating a new folder, running -Prep a dir for Upload- and I get the same issue.
Do you use separate service accounts for cwRsync or Copssh ? Do they have admin privileges ?
I do use separate service account for Rsync and SSH. I am currently using the default accounts that are created and setup as part of the installers. I just looked and the SSH account is a member of the Administrators groups but the RSYNC account was only a member of the Users group so I added it to the Administrators group, rebooted, and tested again and still the same issue. Should the RSYNC account be a member of the Administrator group?
Also here is my rsync.conf file as well just in case:
use chroot = false
strict modes = false
hosts allow = *
log file = rsyncd.log
uid = 0
gid = 0
# Module definitions
# Remember cygwin naming conventions : c:\work becomes /cygwin/c/work
#
[user]
path = /cygdrive/e/folder
read only = false
transfer logging = yes
This problem is reported by multiple users and seems to be related to w2008 or like systems. Could you please try the following:
- Remove uid=0 and gid=0 in rsynd.conf OR
- Locate uid for your service account in etc/passwd and gid in etc/group and replace zero by those.
If none of those will help, I will patch up rsync.
I'm using Windows XP, and I have this problem now after my ISP upgraded rsync to 3.1.
Was working fine with 3.0.9 on both ends, but now it fails with
@ERROR: setgid failed
rsync error: error starting client-server protocol (code 5) at /home/lapo/package/rsync-3.0.9-1/src/rsync-3.0.9/main.c(1516) [Receiver=3.0.9]
Do note that I'm trying to download from server, and the destination directory is mounted with noacl flag, that aside from the fact it was working fine just a day ago.
I removed the uid=0 and gid=0 in rsynd.conf and this fixed the issue.
Thank you very much for your help.