FTP Server on Mac OSX Lion | Day in my life

July 20, 2011

FTP Server on Mac OSX Lion

I was one of the earlier birds to adopt Mac OSX Lion. Bad luck after upgrade, FTP service stopped working, as I need it for my current work found this way to enable and run it.

  1. Create a “Sharing Only” account
  1. Go to “Advanced Options… " and edit Login Shell from “/bin/false” to “/bin/bash” and Home directory to the location of your choice
  1. Add below xml snippet to a file named ftp.plist
<?xml version="1.0" encoding="UTF-8"?>  
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" ">  
<plist version="1.0">  
    <dict>  
        <key>Disabled</key>  
        <true/>  
        <key>Label</key>  
        <string>com.apple.ftpd</string>  
        <key>Program</key>  
        <string>/usr/libexec/ftpd</string>  
        <key>ProgramArguments</key>  
        <array>  
            <string>ftpd</string>  
            <string>-l</string>  
        </array>  
        <key>Sockets</key>  
        <dict>  
            <key>Listeners</key>  
            <dict>  
                <key>Bonjour</key>  
                <true/>  
                <key>SockServiceName</key>  
                <string>ftp</string>  
            </dict>  
        </dict>  
        <key>inetdCompatibility</key>  
        <dict>  
            <key>Wait</key>  
            <false/>  
        </dict>  
    </dict>  
</plist>
  1. Start ftp service by
$sudo launchctl load -F ftp.plist
  1. To stop the service use
$sudo launchctl unload -F ftp.plist

© Nataraj Basappa 2021