Mac OSX 10.9.2,发布错误:"launchctl:文件中的可疑所有权(跳过)"

Sam*_*ami 6 macos cron launchd osx-mavericks

我在三个不同的位置launchctl: Dubious ownership on file (skipping): ~.plist nothing found to load运行launchctl load命令得到了同样的错误,如下所示,并且它们都没有工作:

sudo launchctl load /Library/LaunchDaemons/updates.novel.plist
sudo launchctl load /Library/LaunchAgents/updates.novel.plist
sudo launchctl load /Users/username/Library/LaunchAgents/updates.novel.plist
Run Code Online (Sandbox Code Playgroud)

以下是我的updates.novel.plist文件,请你看看,让我知道是什么问题?谢谢

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>GroupName</key>
   <string>admin</string>
   <key>UserName</key>
   <string>Username</string>
   <key>Debug</key>
   <true/>
   <key>Label</key>
   <string>updates.novel</string>
   <key>ProgramArguments</key>
   <array>
      <string>/Applications/AMPPS/php-5.3/bin/php</string>
      <string>/Applications/AMPPS/www/files/allnovels/novel.php</string>
      <string>--daemon</string>
   </array>
   <key>StandardErrorPath</key>
   <string>/var/log/files/error.1.log</string>
   <key>StandardOutPath</key>
   <string>/var/log/files/error.2.log</string>
   <key>RunAtLoad</key>
   <true/>
   <key>AbandonProcessGroup</key>
   <true/>
   <key>StartCalendarInterval</key>
      <dict>
      <key>Hour</key>
      <integer>14</integer>
      <key>Minute</key>
      <integer>0</integer>
      </dict>
</dict>
</plist>
Run Code Online (Sandbox Code Playgroud)

zne*_*eak 4

launchd 服务需要由拥有 plist 文件的用户启动。如果所有者不是 root,则不得使用 sudo 启动该服务。

此外,文件的权限必须拒绝除所有者之外的所有用户的写访问权限。

最后,该文件必须是常规文件(即不是管道、套接字或其他任何文件)。