I habe problem that the CTRL function 'copyFile' works on the local (test) system correctly but the same code doesn't work anymore on the live system. I always got the message
WCCOActrl19:"WCCOActrl (19), 2020.11.20 10:02:10.205"copyFile() failed, error 3, files: "C:/Data/COAS315/log/manager/MAN_2020_11_20_10_02_10_170.TXT" => "Z:/Auswertungen/Manager/Logs/MAN_2020_11_20_10_02_10_170.TXT".
What does "error 3" mean? Is there a list for this kind of errors?
System: WinCCOA 3.15
Problems with 'copyFile'
- dbindernagel
- Posts:161
- Joined: Mon Feb 23, 2015 1:34 pm
Re: Problems with 'copyFile'
I'm not sure what WinCC OA is using for their command but if it is using the CopyFile function from windows the error code 3 means "ERROR_PATH_NOT_FOUND". But again they could use different error codes.
I would check if if
1. The source file does really exist at the time the copy command is issued.
2. The destination path does exist.
3. As the destination path looks to be a file share I would also check that the file share is actually available/accessable for the user the CONTROL manager is running on.
4. Check if the user the CONTROL manager is running on has read/write acces to the source file and destination folder.
I would check if if
1. The source file does really exist at the time the copy command is issued.
2. The destination path does exist.
3. As the destination path looks to be a file share I would also check that the file share is actually available/accessable for the user the CONTROL manager is running on.
4. Check if the user the CONTROL manager is running on has read/write acces to the source file and destination folder.
- marijanovicd01
- Posts:1
- Joined: Wed Dec 14, 2016 2:59 pm
Re: Problems with 'copyFile'
Hello dbindernagel,
I'm working together with wilko0070. I've tested the same function on an panel as button (same System/Server).
Doing it this way, the files got copied ono the NAS without a hitch.
I've also checked for error throws (stderr), without success.
Thanks
I'm working together with wilko0070. I've tested the same function on an panel as button (same System/Server).
Doing it this way, the files got copied ono the NAS without a hitch.
I've also checked for error throws (stderr), without success.
Thanks
- dbindernagel
- Posts:161
- Joined: Mon Feb 23, 2015 1:34 pm
Re: Problems with 'copyFile'
Please check under which user the failing manager is running and make sure this user has access to the fileshare.
For example check if the server is running as a service and verify that the user the service is started with can copy files to the file share.
For clarification: I mean Windows user. Not WinCC OA user.
For example check if the server is running as a service and verify that the user the service is started with can copy files to the file share.
For clarification: I mean Windows user. Not WinCC OA user.
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Problems with 'copyFile'
With the CTRL function access() you can check the access mode for a file or directory.
Possibly you can use this function to detect if a write permission is given before calling copyFile().
Best Regards
Leopold Knipp
Senior Support Specialist
Possibly you can use this function to detect if a write permission is given before calling copyFile().
Best Regards
Leopold Knipp
Senior Support Specialist