Permission issue running a batch file

8 posts / 0 new
Last post
nowhere86
Offline
Last seen: 7 years 8 months ago
Joined: 20.03.2014 - 13:39
Permission issue running a batch file

On my production server I'm unable to run batch scripts that use the rsync command by double-clicking - I have to right-click 'Run as administrator'. I don't have to do this on three other test servers - they execute either way. 

I've noticed that the Rsyncserver service is set up as a 'local system account'. I can't change to 'This account' as Rsync service fils to start. However on my rest server I can switch between both accounts fine.

I also have n issue with Task Scheduler that for certain Rsync batch files I can't run them under a service account. I need to run them under my account.

Is my only option to reinstall the software? 

 

 

 

itefix
Offline
Last seen: 20 hours 55 min ago
Joined: 01.05.2008 - 21:33
It seems that the issue is

It seems that the issue is related to permissions and a non-supported service account setup. Try to give the service account -full- permissions on the installation directory. If it doesn't work, a fresh install is recommended.

nowhere86
Offline
Last seen: 7 years 8 months ago
Joined: 20.03.2014 - 13:39
To further clarify

So the user 'admin1' which is my local account is the isue here? It is an administrator on the 2008 server. I also can't run the batch script using my id without using 'Run as administrator' too and I installed the software using my id - just as I did on our test servers.

rsync -avz -e "ssh -p 22 -i /home/user1/.ssh/rsync1 " /home/user1/unit3/oper.txt admin1@usserv998:/cygdrive/c/finance

As for the folder containing the software install, administrators has full permissions and admin1 is part of the administrator group as well as me.

Do I further need to grant full permissions on the installtion folder to admin1 too? Not configured that way on the test servers.

 

itefix
Offline
Last seen: 20 hours 55 min ago
Joined: 01.05.2008 - 21:33
Yes if admin1 is the service

Yes if admin1 is the service account. 'Change' permission is more than enough.

nowhere86
Offline
Last seen: 7 years 8 months ago
Joined: 20.03.2014 - 13:39
Best way to uninstall

Should I uninstall both cwrsync, cwrsyncserver and Copssh? From Control Panel...Uninstall programs?

Should I also delete the 2 local user accounts SvcCOPSSH and SvcCWRSYNC or leave them thee for the install?

itefix
Offline
Last seen: 20 hours 55 min ago
Joined: 01.05.2008 - 21:33
Yes, probably the best idea

Yes, probably the best idea is a complete reinstall. Uninstall software, make sure that remnant files in the installation directory are remove and both service accounts removed before a new installation.

nowhere86
Offline
Last seen: 7 years 8 months ago
Joined: 20.03.2014 - 13:39
Still issues when double-clicking

Get this error when double-clicking on the batch file that uses Rsync on windows 2008 server.

Still works if I run as Administrator. I did give the service account -full- permissions on the installation directory this time.

rsync: Failed to exec ssh: Permission denied (13)

rsync error: error in IPC code (code 14) at pipe.c(85) [sender=3.1.0]

rsync: connection unexpectedly closed (0 bytes received so far) [sender]

rsync error: error in IPC code (code 14) at io.c(235) [sender=3.1.0]

nowhere86
Offline
Last seen: 7 years 8 months ago
Joined: 20.03.2014 - 13:39
Update to issue

I was clicking on the various Rsync instsal folders and for one folder got the messae 'you don't have permissions to access this folder". When I clicked to allow permissions I no longer have the error - I can double-click on the batch file now.

Folder in question: D:\cwRsync_Files\cwRsync.

Hopefully this will resolve the service acount issue - will have to verify in the next few days.

 

Release news