-Permission Switch Through Process() in Windows Service
I have an windows service that uses WinSCP to put/get files through Dim winscp As Process = New Process() method. Almost exactly like you posted at https://winscp.net/eng/docs/guide_dotnet#vbnet_example
I recently had a request to be able to set permission on the files during the transfer so I'm implemented the -permissions=664. This worked fine as long as I was running my app local stepping through the code or typing in the commands on WinSCP.com. But when I install the service the permissions do not get set on the file. The service is running under a user account that is a member of the Administrator group on the server.
Example: put -permissions=664 D:\myFile.log /remoteDir/
I don't get any errors or messages when running this above command through the Dim winscp As Process = New Process() method, the file transfers fine, but the permissions do not get set.
Other than this everything is working great!
Any idea?
I recently had a request to be able to set permission on the files during the transfer so I'm implemented the -permissions=664. This worked fine as long as I was running my app local stepping through the code or typing in the commands on WinSCP.com. But when I install the service the permissions do not get set on the file. The service is running under a user account that is a member of the Administrator group on the server.
Example: put -permissions=664 D:\myFile.log /remoteDir/
I don't get any errors or messages when running this above command through the Dim winscp As Process = New Process() method, the file transfers fine, but the permissions do not get set.
Other than this everything is working great!
Any idea?