Unable to copy file to /var/<myfolder> from .pkg installer

We have .pkg installer for our appliation in which we are copying some files to "/var/<myfolder>". This .pkg installer works fine till 10.10 but in 10.11 while copying file to "/var/<myfolder> prompts error and failed to copy files. It shows the below error in Install.log


Jul  3 17:11:50 MacBook-Pro installer[431]: Set authorization level to root for session\
Jul  3 17:11:50 MacBook-Pro installer[431]: Administrator authorization granted.\
Jul  3 17:11:50 MacBook-Pro installer[431]: Will use PK session\
Jul  3 17:11:50 MacBook-Pro installer[431]: Using authorization level of root for IFPKInstallElement\
Jul  3 17:11:50 MacBook-Pro installer[431]: Package generated system content warning: Error Domain=IFInstallErrorDomain Code=-5000 "This package is incompatible with this version of OS X and may fail to install." UserInfo=0x7ff750cce3d0 \{NSLocalizedRecoveryOptions=(\
    "Cancel Installation",\
    "Install Anyway"\
  ), NSLocalizedRecoverySuggestion=Installing this package may damage your system, and the installation may fail. To stop the program and the installation, click \'93Cancel Installation\'94., IFSystemPathsKey=(\
    "var/gct/gdme2dn.xml",\
    "var/gct/gdmuimg.bin",\
    "var/gct/gdme2dn",\
    "System/Library/LaunchDaemons/com.gct.dts.gdme2dn.plist",\
    "var/gct/libWiMAXSDK.dylib"\
  ), NSLocalizedDescription=This package is incompatible with this version of OS X and may fail to install.\}\
Jul  3 17:11:50 MacBook-Pro installer[431]: Starting installation:\


- Able to copy all these file maually in "/var/gct" but not from .pkg installer

- There is no permission issue on "/var/gct" becuase manually it copying successfully.

- Please help why installer throws the warning and ubable to copy these files?


Thanks in advance.

Accepted Reply

The "System" folder and all its subfolder are locked under SIP (System Integrity Protection), even with root access. You're trying to copy "com.gct.dts.gdme2dn.plist" to a subfolder of "System", which I think is the problem.


Installer does have exceptional access, but only when installing an Apple signed package, which perhaps yours is not?

Replies

The "System" folder and all its subfolder are locked under SIP (System Integrity Protection), even with root access. You're trying to copy "com.gct.dts.gdme2dn.plist" to a subfolder of "System", which I think is the problem.


Installer does have exceptional access, but only when installing an Apple signed package, which perhaps yours is not?

Thanks Max,


We moved our files to /Applications/<myfolder> folder insted of /var/<myfolder>. In el capitan this system folders are locked due to SIP. Thaks for reply.

Glad it's sorted for you yesdev 🙂


To mark your question as answered (it goes green so that others can easily see there is a solution for it) you have to log in to these Developer Forums first (top left of this page) and then come back to this thread.