I want to know if I can leave just my internet connection online while my MacBook is hibernating or sleeping. Because when my computer goes asleep it disconnects from the internet, and I need my FTP server running. Its a pretty straight forward question.

link|improve this question

0% accept rate
feedback

migrated from stackoverflow.com Oct 17 '09 at 12:14

This question came from our site for professional and enthusiast programmers.

4 Answers

If you go to the Energy Saver control panel (in System Preferences, which you can open from the Apple menu), you can stop it from automatically going to sleep.

On the other hand, if you actually do want to put the computer to sleep and still run your FTP server, that'd be a bit tricky. The computer needs to be awake when the FTP server is actually serving a connection.

However, if you're prepared to do a bit of fiddling around you might be able to get it to sleep when no one's using the FTP server, and wake up when someone tries to connect. The feature is called Wake on LAN, although in the Mac's Energy Saver they call it wake for Ethernet network administrator access. This article might be of some use if you want to find out how to use the feature...but I'd say it'd probably only work for you if you're connecting to the FTP server from your local network.

link|improve this answer
Wake on LAN won't work. You need some way of sending the magic packet to wake it up. A NIC won't WOL for any arbitrary traffic. – MDMarra Oct 17 '09 at 18:28
Indeed, but I thought the OP might've been using the FTP server just for personal use on his local network. If so, he could send the magic packet when he wanted to connect to the server (and then perhaps run a script remotely to put the computer back to sleep when he was done). – David Oct 18 '09 at 0:57
feedback

Apple added Wake-On-Lan support to the Airport Extreme and Time Capsule in a recent firmware update. For more information, read Apple's knowledge base article on compatibility and usage: http://support.apple.com/kb/HT3774

link|improve this answer
FWIW, Wake-On-LAN support existed before but it has been expanded to include Wake-on-WLAN and will send the WOL packet (hence Wake on Demand) when the computer is to be accessed using MobileMe or from another computer within the same network. – Chealion Oct 24 '09 at 6:00
feedback

If you're running a straight FTP server, the only way to keep it online for general access is to prevent the computer from sleeping. Even if you were able to somehow keep the NIC active during sleep, the FTP server is software that runs on the operating system, and the OS halts completely when sleep occurs.

Wake-on-LAN is irrelevant here since you're running an FTP server open to the Internet. (Internet = WAN ≠ LAN)

The one workaround here that may apply to your situation would be to allow Wake-on-LAN in Energy Saver preferences, allow the computer to sleep, and keep it behind a router that is capable of sending the magic WOL packet. As long as it's only you that needs to access the FTP server, you would be able to leave your computer asleep, and then when you need it from a remote location on the internet, you would first access your router's http interface, wake up your FTP server from that, and then connect to the FTP server.

link|improve this answer
feedback

If your computer is connected via the Ethernet cable (as opposed to wireless), then try out this idea:

  1. Open the System Preferences
  2. Click Energy Saver
  3. Check the Wake for Ethernet network access check box

You should test it out by putting your computer to sleep, then attempt to ftp access it. I found on Apple's website an article (ID: HT3774, google for it and you will find it) which talks about setting up "Wake on Demand", but the requirement is an Apple's Airport router (Airport, Airport Extreme, Time Capsule...). Good luck.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.