Difference between revisions of "Enable FTP Server"

From AwkwardTV
Jump to: navigation, search
m
m (Tried to clean this up with some descriptions and made it clear which parts you need to copy and paste.)
Line 1: Line 1:
There is already an FTP server on the AppleTV just waiting to be activated. It's relatively simple to do so. Here are some cut-and-paste commands:
+
There is already an FTP server on the AppleTV just waiting to be activated. It's relatively simple to do so. Cut and paste the seperate code blocks into a terminal window:
  
<pre>sudo -s
+
'''Give super-user privileges:'''
 +
<pre>sudo -s</pre>
  
cat <<EOT > /System/Library/LaunchDaemons/ftp.plist  
+
 
<?xml version="1.0" encoding="UTF-8"?>
+
'''Write the FTP configuration file:'''
 +
<pre>cat <<EOT > /System/Library/LaunchDaemons/ftp.plist</pre>
 +
 
 +
<pre><?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">
 
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 
<plist version="1.0">
 
<plist version="1.0">
Line 34: Line 38:
 
</dict>
 
</dict>
 
</plist>
 
</plist>
EOT
+
EOT</pre>
 +
 
 +
 
 +
'''Reload that configuration file after changing it:'''
 +
<pre>launchctl load /System/Library/LaunchDaemons/ftp.plist</pre>
  
launchctl load /System/Library/LaunchDaemons/ftp.plist</pre>
 
  
 
Simple as that. It should start working right away.
 
Simple as that. It should start working right away.
  
 
[[Category:How-to]]
 
[[Category:How-to]]

Revision as of 18:26, 15 May 2007

There is already an FTP server on the AppleTV just waiting to be activated. It's relatively simple to do so. Cut and paste the seperate code blocks into a terminal window:

Give super-user privileges:

sudo -s


Write the FTP configuration file:

cat <<EOT > /System/Library/LaunchDaemons/ftp.plist
<?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>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>
EOT


Reload that configuration file after changing it:

launchctl load /System/Library/LaunchDaemons/ftp.plist


Simple as that. It should start working right away.