Detailed FTP Logging in OSX

To check what is happening in detail from OSX, you can do the following:

Inside of Applications on your Mac is a folder called Utilities.

Inside Utilities is an Application called Terminal.  Open this application.

Now, in the window, type  tail -f /var/log/ftp.log

This will show you the history of what has happened in the FTP server. Fire up MediaTransfer and watch to see any new messages. below is an example of the messages when an incorrect username or password is being entered by MediaTransfer:

Dec 26 17:19:55 MacBook-Pro ftpd[274]: connection from 127.0.0.1 to 127.0.0.1

Dec 26 17:20:01 MacBook-Pro ftpd[274]: FTP LOGIN FAILED FROM 127.0.0.1

A successful connection looks like this:

Dec 26 17:22:17 MacBook-Pro ftpd[332]: connection from 127.0.0.1 to 127.0.0.1

Dec 26 17:22:24 MacBook-Pro ftpd[332]: FTP LOGIN FROM 127.0.0.1 as jeremylaurenson (class: real, type: REAL)




Its also possible to turn up logging even further to view even more details of what is or is not going on, if you absolutely must:

Hit <Control><C> to stop listing and type:

sudo nano /System/Library/LaunchDaemons/ftp.plist

Edit the file to look like this, and then restart your Mac, and follow this procedure again. (<Ctrl><W> saves the file):


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<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>

                <string>-l</string>

                <string>-U</string>

                <string>-n</string>

        </array>

        <key>inetdCompatibility</key>

        <dict>

                <key>Wait</key>

                <false/>

        </dict>

        <key>Sockets</key>

        <dict>

                <key>Listeners</key>

                <dict>

                        <key>SockServiceName</key>

                        <string>ftp</string>

                        <key>Bonjour</key>

                        <true/>

                </dict>

        </dict>

        <key>SHAuthorizationRight</key>

        <string>system.preferences</string>

</dict>

</plist>




© 2011 Jeremy Laurenson / MapPin Software