Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Networking > Setting up a FTP

Setting up a FTP
Thread Tools
Parvez
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 28, 2008, 11:48 AM
 
How do I go on about setting a ftp server on my macbook? I know you have to enable File Sharing then add the folders you want to share then go to Option and tick the FTP box. Then it says you can access it at ftp://192.168.1.2/

I forwarded the port 21 in my router already. When I put a file in that folder and give people ftp://my.ip.address.here/ (not my router ip, my external ip address from ISP)

For some reason.. my friend can't access it. It gives some 506 permission denied.

However, when I enable Web Sharing and put files in the "Sites" folder... my friend can access it via http://my.ip.address.here/foldername/

What am I doing wrong here?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 28, 2008, 12:22 PM
 
First of all, are you aware that using FTP is unsafe? SFTP/SSH is a much better option all round.

Is this user authenticating as you? If not, does he have readable access to these files? Is the permission denied error he is getting after a successful login?
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 28, 2008, 12:26 PM
 
Originally Posted by besson3c View Post
First of all, are you aware that using FTP is unsafe? SFTP/SSH is a much better option all round.

Is this user authenticating as you? If not, does he have readable access to these files? Is the permission denied error he is getting after a successful login?
Why is it unsafe?

Then how do I get on setting up the SFTP?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 28, 2008, 12:32 PM
 
It's unsafe because your packets including your password are sent unencrypted, in the clear when you use it (by design).

To enable SFTP, turn on "Remote Login", open up port 22 from your router, and simply connect to your server over the SFTP protocol rather than the FTP protocol. Your friend may need to change clients if his doesn't support SFTP (although many do).

Traffic will be a a little slower over SFTP since it will be sent through an encrypted tunnel.
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 28, 2008, 12:35 PM
 
Thank you. It seem to be working.

Is there any way I can give my friend a link to access it? Or he has to use a client to access it?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 28, 2008, 12:38 PM
 
It's best to use the client to access it directly anyway... I'm not sure that most operating systems will know to direct ftp:// requests to the appropriate FTP client, and I'm not even sure that any would support sftp:// requests.
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 28, 2008, 12:45 PM
 
Ah using sftp:// brings up my client to access it.

Also is it worth using http://ipaddress? Some people are not so computer savvy and they may not be comfortable using a client. You know what I mean? If I use http:// to allow a friend to access to a folder... do I have to drop it in the Sites folder or Public Folder? Dropping it in the Sites folder worked for me but what's the point of Public Folder then?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 28, 2008, 12:49 PM
 
Files that are served by Apache over HTTP need to be served from Sites, although you could reconfigure Apache to serve files from Public. The Public folder was designed to share files with people over AFP, Sites is for serving websites.

Serving files over HTTP is fine, although unless you setup an authentication scheme they are obviously exposed to the world. Moreover, many browsers do not support resumeable downloads like FTP/SFTP clients do, which usually makes FTP/SFTP the better choice for serving large files.
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 28, 2008, 12:50 PM
 
Thanks a lot for the help.

     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 28, 2008, 02:10 PM
 
No problem!
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 28, 2008, 06:48 PM
 
One more thing... Let's say I am using the http://ipaddress to give to my friend and he downloaded the files I have in the folder. Is there any way I can see how many times the file was downloaded/accessed or a log where it shows incoming connection?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 28, 2008, 08:01 PM
 
Sure, via the Apache access log. You can install something like awstats that analyzes the logs and generates a good overview and summary of your traffic.
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 29, 2008, 12:44 AM
 
Where are the log files located? Do I have to ssh to view it?

And OMG.. that Awstats is too advanced for me. I just found bunch of files with scripts and they make no sense to me, lol.

It's okay though.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 29, 2008, 12:52 AM
 
/var/log/httpd/access_log
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 30, 2008, 05:42 PM
 
Thanks again
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Jul 31, 2008, 11:47 PM
 
I keep on bumping this thread by replying back again, haha.

I wanted to ask what would be the best way to send a friend of mine a copy of Microsoft Office? He recently got a MBP with VMWare Fusion w/ Windows XP. I have the disc for MS Office. Do I just drag all the contents in the disc and place them in another folder then .zip that folder?

And would you recommend me putting it on the HTTP server? He said he gets around 65kbs when he tries to download from my HTTP server. I guess he'll have to leave the MBP on over night if he downloads from my HTTP?

Any other alternatives?

My upload speed at home isn't so great. At work, I get around 1532kbs for upload so I can do it from work as well. But what would be the best way?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Jul 31, 2008, 11:50 PM
 
Uploading from your home broadband connection is going to be slow no matter what protocol you use, as most ISPs severely cap upload bandwidth. There are a number of ways in which you can send your friend the file, many of which you have covered.
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Aug 1, 2008, 12:00 AM
 
Well I mentioned about uploading from home and work.

My work computer has Windows XP so it doesn't have a HTTP server. What do I do now then?

And will it work if I .zip the contents from the disc? What I mean by work is that.. will he be able to install it in his VMWare?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Aug 1, 2008, 10:30 AM
 
The Mac version of Office? No, because OS X will not run as a VM guest. The Windows version? Sure...

You're on your own with getting the file to your friend.
     
chichow
Forum Regular
Join Date: Feb 2007
Status: Offline
Reply With Quote
Aug 2, 2008, 08:37 PM
 
Better you create a disc image using the disk utility or Toast and then just have him burn the image to CD.
     
Parvez  (op)
Forum Regular
Join Date: Oct 2006
Location: New York City
Status: Offline
Reply With Quote
Aug 2, 2008, 11:38 PM
 
Thanks for the suggestions. He came over to my house and he hooked up to my network and sent over local network.

By the way... why is that when I go to Sys Pref > Sharing > Enable File Sharing > Option > Check Share files and folders using FTP

When I go to ftp://192.168.1.6 it says "You don't have permission to open this page." under it, "You don't have permission to view "Testfolder"

Already forwarded 21 port.

I know it's not secure enough. But I am just curious to why it isn't working. It's pissing me off.

Edit: PureFTPd did the job.
( Last edited by Parvez; Aug 3, 2008 at 12:55 AM. )
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 10:06 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,