Error on zpm load command after creating CSPApplication: "Command attrib not found."
I'm encountering an error while executing the zpm "load -verbose ..." command. The process terminates after attempting to create a CSPApplication with the following error: "Command attrib not found."
Logs
Please find the relevant log excerpt below:
Creating Web Application /xyz-app
AutheEnabled: 32
AuthenticationMethods:
AutoCompile: 1
CSPZENEnabled: 1
CSRFToken:
ChangePasswordPage:
CookiePath: /
DeepSeeEnabled: 0
Description:
DispatchClass:
Enabled: 1
ErrorPage:
EventClass:
GroupById: XYZ
HyperEvent: 0
InbndWebServicesEnabled: 1
IsNameSpaceDefault: 0
JWTAccessTokenTimeout:
JWTAuthEnabled:
JWTRefreshTokenTimeout:
LockCSPName: 1
LoginPage:
LoginTokenEnabled: 0
MatchRoles:
NameSpace: XYZ
Package:
Path: D:\Intersystems\HCPROD\CSP\xyz-app\
PermittedClasses:
Recurse: 1
RedirectEmptyPath:
Resource:
ServeFiles:
ServeFilesTimeout:
SessionScope:
SuperClass:
Timeout:
TwoFactorEnabled: 0
Type: 2
UseCookies:
UserCookieScope:
WSGIAppLocation:
WSGIAppName:
WSGICallable:
WSGIDebug:
WSGIType:
iKnowEnabled: 0
Done.
[module-xyz] Activate FAILURE
[31mERROR![0m Command attrib not found.
Additional Information
I have verified that the attrib command is available on the Windows system and is located in the System32 directory.
In the IPM code, I found that the attrib command is used in the MakeDirectoryWriteable method, which is invoked before and after the file copying process. The error seems to be thrown in a catch block at:
I would like to understand what the exception code 34 signifies. Does it always indicate that the command was not found? I suspect the command might have been executed but encountered an error that was not logged.
Environment Details
- IPM Version: 0.10.3
- Host: Windows Server 2022 Standard
- InterSystems HealthConnect Version: 2025.1
Any assistance in debugging this issue would be greatly appreciated. I'm happy to provide further information to help narrow down the cause of this error.
@tobikrs So error code 34 is "unknown error writing to new volume". It's not immediately obvious to me why this indicates the command is unavailable. Have you tried calling $zf(-100) directly and seeing if that works? E.g. something like this:
zw $zf(-100,"",$listbuild("attrib","-r"_##class(%Library.File).NormalizeDirectory(<directory>)_"*.*","/s"))