0

I am trying to run pure-ftpd 1.0.46 as a service and have configured my plist file as below:

<?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>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>homebrew.mxcl.pure-ftpd</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/local/opt/pure-ftpd/sbin/pure-ftpd</string>
      <string>-A</string>
      <string>-E</string>
      <string>-j</string>
      <string>-z</string>
      <string>-l</string>
      <string>puredb:/usr/local/etc/pureftpd.pdb</string>
      <string>-I</string>
      <string>1</string>
      <string>-c</string>
      <string>1000</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>WorkingDirectory</key>
    <string>/usr/local/var</string>
    <key>StandardErrorPath</key>
    <string>/usr/local/var/log/pure-ftpd.log</string>
    <key>StandardOutPath</key>
    <string>/usr/local/var/log/pure-ftpd.log</string>
  </dict>
</plist>

However, I find that whenever I try running as a service it logs the following errors.

pure-ftpd: invalid option --
pure-ftpd: unrecognized option `--j -z' Unable to start a standalone server: Permission denied

Can anyone identify an error I've made in my plist file?

I tried to confirm it matched the example in SirPavlovas answer provided here : Getting launchd to read program arguments correctly

  • How do you wanna run pure-ftpd? – klanomath May 20 '17 at 9:43
  • As a service (though homebrew), the flags indicated above are the flags I would like to pass in terms of customising its behaviour. Passing the above flags directly to pure-ftpd when executing directly works, but I have been unable to get a plist file working. – Syntax May 21 '17 at 23:34
1

For anyone having this trouble or similar, use the command line plutil to get feedback on what the plist file problems are (e.g. line numbers). In my case the copy from the Confluence page I used to document the install guide inserted broken whitespace characters, invisible to the naked eye but affecting launchd.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .