FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 14th, 2003, 09:37 AM
masgron masgron is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Italy
Posts: 2 masgron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
FTP account

How to create Unix user account that only has FTP access and to only one directory?

Reply With Quote
  #2  
Old November 15th, 2003, 01:39 PM
christo's Avatar
christo christo is offline
Introspective
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Nov 2001
Location: London, UK
Posts: 3,296 christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level)christo User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 1 h 5 m 42 sec
Reputation Power: 101
Send a message via ICQ to christo Send a message via Yahoo to christo
It will depend on what FTP server you are using, but if you're using ProFTP, it's quite easy to specify a DefaultRoot into which your users will be jailed - in fact it'll look to them like it's the root of your entire filesystem.

The actual unixy side of preventing them from doing anything else is quite easy - you can first set up a special group called ftpusers, then everytime you create a user just make sure that you make them a member of that group - you might find the convenient when hacking your ftp config (hint). Further to that, just set the user's home area to /dev/null and their default shell to /bin/false - that way they won't ever get a shell running, so the only way they can connect is vi whatever services you're running on the machine.

hth
christo

Reply With Quote
  #3  
Old November 17th, 2003, 03:09 AM
masgron masgron is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Italy
Posts: 2 masgron User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
FTP issue

Hi Christo,
unfortunately I didn't use a ProFTP server but an Unixware 7.1.1 server, currently used as Application Server in a Call Center environment. I want to give the access to the system via ftp to an application that makes automatic file transfer. So any suggestion are kindly accepted.

Cheers

Max

Reply With Quote
  #4  
Old November 30th, 2003, 12:18 PM
Perderabo Perderabo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 121 Perderabo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 54 sec
Reputation Power: 5
Without changing servers you probably will not be able to restrict them to one directory. But you should be able to limit them to ftp acess only.

As Christo said, set their shell to /bin/false or /usr/bin/false, which ever your system uses. You cannot set thier home directory to /dev/null, ftpd uses that field too. Set the home directory correctly.

Most ftp servers will not allow a connect unless the users shell is in /etc/shells. Check your "man ftpd" to see if yours is one. If so, you will need to do that. If /etc/shells does not exist, the system behaves as if it did and it contains a default list. If your /etc/shells does not exist, you will need to add a line for every login shell in use together with /bin/false.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FTP account


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway