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 > how do I keep folks logging in via FTP confined to their own directory?

how do I keep folks logging in via FTP confined to their own directory?
Thread Tools
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Jan 31, 2005, 01:04 PM
 
I've got the ftp service set up and running on my Mac OS X laptop. It's on a LAN with some other computers. When I log in, I have to log in as a user who's already set up on the laptop (haven't yet figured out how to set up anonymous FTP on 10.3). Fine. Trouble is, when that user logs in, they can simply 'cd ..' then 'cd some_other_user' and have access to everybody else's stuff.

How can I arrange things so that ftp users only have access to their own home directory?

And if anyone can tell me how to set up anonymous FTP on 10.3, that would probably be even better. I've tried using the "Accounts" system pref, but it won't let me create a user named "ftp".

Thanks,
---J
     
johnMG  (op)
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Jan 31, 2005, 01:48 PM
 
Found this for setting up anonymous ftp:
http://digitalelf.net/archives/000030.html

Worked like a charm.
     
Forum Regular
Join Date: Jan 2002
Location: Manitoba
Status: Offline
Reply With Quote
Feb 2, 2005, 03:46 PM
 
Unless you have a root account and use it to restrict permission of your regular user(s). In the end I think anainymous ftp is the best way as it restricts the root directory to the one you set it as (ie /Users/Share)
     
johnMG  (op)
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Feb 3, 2005, 09:46 AM
 
Thanks for the reply Sarah.

I went ahead and set up anonymous FTP and it works. The only problem is, I set it up for someone who doesn't know much about computers, and whenever he gets files FTP'd to him, now he can't open them since he's no the owner (the files instead belong to user "ftp").

I think I just need to provide a script.command file which will chmod all the files in the /Users/ftp directory, but it turns out he's running 10.1 rather than the current 10.3 so I'm crossing my fingers hoping it'll work.
     
Forum Regular
Join Date: Jan 2002
Location: Manitoba
Status: Offline
Reply With Quote
Feb 3, 2005, 04:14 PM
 
well if the files are all owned by ftp then you would have to have the script set to chown the files instead. I think the OS X terminalogy would be :

chown -R group:user <file or directory name>
     
johnMG  (op)
Registered User
Join Date: Oct 2003
Status: Offline
Reply With Quote
Feb 4, 2005, 11:29 AM
 
> chown -R group:user <file or directory name>

Yup. Actually, I think that's user:group rather than group:user, but
I did that and got it working. In fact, I wrote 2 scripts: one to run chown on every file in the /Users/ftp directory, and another to run the first script as sudo. I worked good.

Only trouble now is, the user is having a problem opening up the images that are getting ftp'd to his machine, but that might be the subject of another thread. :) He's only running 10.1, and we're updating quicktime today, so I'm hoping that'll do it.
     
   
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:31 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2