Does mac security need write permission when daemon starts?

I have been instructed to transfer the Tomcat / Jenkins installation from an outdated (and now removed in Yosemite) SystemStarter system to run. It starts up and works just fine, as the "build" user, except for one. Part of our build process involves invoking the security command to manipulate the key chain. This does not work as follows:

security: cert import failed: write permissions error
security: problem decoding

If I ssh into the build machine and start Tomcat from the command line, via bin / startup.sh, then the call securitywill not complain. This only complains when I launch Tomcat through launchd. My plist looks like this:

<plist version="1.0">
<dict>
    <key>Label</key>
    <string>org.apache.tomcat</string>
    <key>UserName</key>
    <string>builduser</string>
    <key>WorkingDirectory</key>
    <string>/Users/builduser</string>
    <key>Program</key>
    <string>/Users/builduser/bin/tomcat.sh</string>
    <key>KeepAlive</key>
    <dict>
        <key>SuccessfulExit</key>
        <true/>
    </dict>
    <key>EnvironmentVariables</key>
    <dict>
        <key>CATALINA_HOME</key>
        <string>/Users/builduser/Tomcat</string>
        <key>CATALINA_OPTS</key>
        <string>-Djava.awt.headless=true</string>
        <key>JAVA_OPTS</key>
        <string>-Xmx1024m -XX:MaxPermSize=512m</string>
    </dict>
</dict>
</plist>

plist is located in / Library / LaunchDaemons, and tomcat.sh is just a shell that starts tomcat, and then waits for the process to die.

+4
3

- .mobileprovision,

cmd -D -i <path_to_file>

SSH, Python security: cert import failed: write permissions error

, , keychain security:

cmd -D -k <specific_keychain> -i <path_to_file>

100%, , , , .

+3

Dariusz, . joensson:

fooobar.com/questions/56827/...

, plist.

<key>SessionCreate</key>
<true/>
<key>UserName</key>
<string>builduser</string>

, UserName, SessionCreate.

+1

, , , , , , ssh, .

Before you try anything, start security default-keychainand make sure that you are using the key chain that you expect. If this is not the case, you can pass the correct option using the -k flag, as mentioned above in Dariusz's answer. This may be a corruption problem in the key chain, so you can try resetting or fixing the keychain.

Remember that there are both ~/Library/Keychains, andLibrary/Keychains

0
source

All Articles