Question

Setup users to Log into own web directory using Proftd

Asked by: M_A_D_C_A_T

Hi,

Ive got an apache web server setup on fedora core 1. I've got a static IP with my ISP, and are hosting multiple businesses websites on my fedora box using virtual server directives so that url requests display the correct page.

I wish to setup an ftp server (I've been told to use Proftpd - correct me if another server should be used :) ) so that each business can ftp into their own html directory on the webserver so they can update their sites. I have setup the directory structure on the wevbserver such that the html folder has subfolders that contain the businesses sites.

 I have very limited experience with linux so please be descriptive with your answer :) I am willing to offer more points if I am asking for a very lenghty or difficult answer.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-01-15 at 09:28:53ID20851937
Topic

Miscellaneous Web Development

Participating Experts
1
Points
500
Comments
24

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. proftpd
    I'm running Fedora Core 4 and it has vsftp installed. I would like to change this and use proftp instead. How do I keep vsftp from starting at boot and how to install proftpd as it's replacement. The package for proftpd are not already on the server so I suppose I would ha...
  2. Linux (Fedora) + Proftpd + MySQL
    I have Linux Fedora Core 2 with MySQL 4.0.25 and ProFTPd 1.2.10. I need detailed instructions on how to setup ProFTPd with MySQL authentication. I already tried to compile ProFTPd with the following instructions: http://www.khoosys.net/single.htm?ipg=848 The problem is tha...
  3. PROFTPD Urgent question
    Hi Everyone, Question: When i logged into ftp, i can not upload any files, create directories, rename or delete files/directories Steps i followed: 1. I added a new ftp user account into /etc/passwrd: myftpuser:x:501:502:Example FTP User:/virtualhosts:/sbin/nologin 2. Cre...
  4. ProftpD issues
    I have a Fedora Core 3 server running proftpd, and for some reason the ftp server sometimes causes issues and won't allow me to FTP in, it will just hang there. How can I restart the service manually from the shell so I don't have to reboot the entire machine remotely? Al...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: tncbbthositgPosted on 2004-01-15 at 11:49:37ID: 10123300

I wouldnt use either.  FTP is not secure.

I'd use SSH at www.ssh.com

TNC

 

by: tncbbthositgPosted on 2004-01-15 at 11:58:28ID: 10123376

More Info:

You also might check out:
http://vsftpd.beasts.org/ (notice the bit about Proftpd)
http://bsdftpd-ssl.sc.ru/

and this might interest you too:
http://www.glub.com/products/secureftp/

 

by: tncbbthositgPosted on 2004-01-15 at 11:59:09ID: 10123381

Sorry for the multi-post:  All of those have instructions online regarding use.

Good luck,
TNC

 

by: M_A_D_C_A_TPosted on 2004-01-15 at 17:47:09ID: 10126228

I worte this question quite late at night, and it appears that ive missed the point.

 I am looking for step by step instructions on setting up the ftp server (vsftpd sounds like the go). Sorry about the misleading post.

Cheers

Travis

 

by: tncbbthositgPosted on 2004-01-16 at 04:55:55ID: 10129012

Download this:
ftp://vsftpd.beasts.org/users/cevans/vsftpd-1.2.1.tar.gz

Step by step instructions:
http://www.fbunet.de/vsftpd.shtml
-or-
ftp://vsftpd.beasts.org/users/cevans/untar/vsftpd-1.2.1/INSTALL

In /etc/vsftpd.conf, you'll find the line:
# Allow anonymous FTP?
anonymous_enable=NO
*Be sure it does say NO!*

Check this out too:
ftp://vsftpd.beasts.org/users/cevans/untar/vsftpd-1.2.1/FAQ

Does that help?
TNC

 

by: M_A_D_C_A_TPosted on 2004-01-16 at 07:59:48ID: 10130474

Hi,

I had a read the faq's and install instructions, but I cannot find anywhere to set up folders that a given user can access when they log in. Ie have a user put their username and password and restrict their access to their own html folder.

I assume that I have to setup a user for each site, make their home directory the html folder for their site and use the

"chroot_local_user=YES"

directive in the vsftpd.conf file.

Will this restrict them from accessing other folders on the system??

Please excuse my ignorance, I am very new to linux and this has been a steep learning curve :)

Cheers
Travis

 

by: tncbbthositgPosted on 2004-01-16 at 09:29:04ID: 10131392

Ah.  You want to create users for these accounts and direct their home directories to their home directories (I know that makes no sense).

Read: http://www.linuxheadquarters.com/howto/basic/adduser.shtml

if you have a user that has webpage www.experts-exchange.com and that user ID is eedotcom and that webpage is hosted from ./htdocs/ee/ then you want to use:
/usr/sbin/adduser -d ./htdocs/ee/ -p eepass

if you want multiple users to access this public html directory, then add a group and add users to the group.
Read this: http://www.linuxheadquarters.com/howto/basic/groupadd.shtml

 

by: M_A_D_C_A_TPosted on 2004-01-17 at 22:54:03ID: 10139545

Ok, I've installed vsftpd, left the vsftpd.conf file as is except for uncommenting the lines

anonymous_enable=NO
local_enable=YES
write_enable=YES

Ive configured xinetd to run when ftp requests are made

ive setup a number of accounts, 1 for each business that im hosting with their home directories set to the directory that stores their web site.

When I attempt to connect to the ftp server using cuteftp on another machine on the network, i get the following error

STATUS:>      Connect: Sunday 17:12:26 01-18-2004
STATUS:>      Connecting to 192.168.1.50
STATUS:>      Connecting to 192.168.1.50 (ip = 192.168.1.50)
STATUS:>      Socket connected. Waiting for welcome message...
      500 OOPS: vsftpd: security: 'one_process_model' is anonymous only
ERROR:>      Unknown response code: 500
ERROR:>      Can't log in. Disconnecting...
STATUS:>      Disconnect: Sunday 17:12:26 01-18-2004

Is there a configuration directive that I can change for that?
Is this configuration going to prevent a given buiness from accessing other directories on the system other than their own web folder and subfolders?

Cheers

Travis

 

by: tncbbthositgPosted on 2004-01-18 at 10:42:05ID: 10141403

in vsftpd.conf, find one_process_model and make sure that it is disabled.

TNC

 

by: M_A_D_C_A_TPosted on 2004-01-19 at 01:01:07ID: 10144978

Ok, i think im nearly there :)

Ive got it attempting to login now without throwing errors, but now it doesnt accept any of the user/password combinations, i've even tried root/*password*

Below is my vsftpd.conf file:

# Access rights
anonymous_enable=NO
local_enable=YES
write_enable=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
# Security
anon_world_readable_only=YES
connect_from_port_20=YES
hide_ids=YES
pasv_min_port=50000
pasv_max_port=60000
# Features
xferlog_enable=YES
ls_recurse_enable=NO
ascii_download_enable=NO
async_abor_enable=YES
chroot_local_user=YES
# Performance
one_process_model=NO
idle_session_timeout=120
data_connection_timeout=300
accept_timeout=60
connect_timeout=60
anon_max_rate=50000

Cheers

Travis

 

by: tncbbthositgPosted on 2004-01-19 at 06:56:49ID: 10146733

What does the cuteftp "log" say about the attempted connection?

TNC

 

by: M_A_D_C_A_TPosted on 2004-01-19 at 21:46:25ID: 10152728

STATUS:>      Connect: Monday 19:05:57 01-19-2004
STATUS:>      Connecting to 192.168.1.50
STATUS:>      Connecting to 192.168.1.50 (ip = 192.168.1.50)
STATUS:>      Socket connected. Waiting for welcome message...
      220 (vsFTPd 1.2.1)
STATUS:>      Connected. Authenticating...
COMMAND:>      USER root
      331 Please specify the password.
COMMAND:>      PASS **********
      530 Login incorrect.
ERROR:>      Can't log in. Still trying...

It then pops up a dialog box to retype the username and password

 

by: tncbbthositgPosted on 2004-01-20 at 05:32:18ID: 10154708

Try this:

Following these directions (http://www.siliconvalleyccie.com/linux-hn/ftp-server.htm#_Toc57733510), see if you can log into it on the local host.

You might need to add "vsftpd: ALL" in the /etc/hosts.allow file.

Let me know,
TNC

 

by: M_A_D_C_A_TPosted on 2004-01-21 at 00:22:26ID: 10162420

The link posted above appears to be broken??

Ive tried adding "vsftpd:ALL" and creating a file called vsftpd.chroot_list that contains all the usernames that I want to be able to log into the server

Still dont work :(

Is the server trying to authenticate using PAM (i have no idea what that means - but ive read it in vsftpd install guides) I dont think i need to use PAM, because im not using virtual users - all the users that im trying to log in as exist on the system.

I tried loggin in using the command "ftp localhost" and that rejects the username/password combinations im giving it to :(

 

by: M_A_D_C_A_TPosted on 2004-01-21 at 00:35:47ID: 10162539

I had a look into this PAM thingy, and if i run ldd vsftpd, it tells me that the PAM is linked with vsftpd.

following the FAQ "ftp://vsftpd.beasts.org/users/cevans/untar/vsftpd-1.2.1/FAQ" i copied the sample PAM file from /RedHat/vsftpd.pam to /etc/pam.d

What else do i have to do to get the users to authenticate properly??

 

by: tncbbthositgPosted on 2004-01-21 at 04:23:33ID: 10164052

Did you do this: Enable FTP. Edit the /etc/xinetd.d/vsftp and set the disable value to "no"?  The link above works for me.  It's helpful.

what does it say when you use ftp localhost?

We'll get you fixed up!

TNC

 

by: M_A_D_C_A_TPosted on 2004-01-21 at 05:39:48ID: 10164558

Yeah, the ftp client is being run when the machine receives data to port 21, cos when I type ftp localhost on the console i get:

220 (vsFTPd 1.2.1)
Name (localhost:root):

and when i try to cuteftp in from another machine i get:

STATUS:>     Connect: Monday 19:05:57 01-19-2004
STATUS:>     Connecting to 192.168.1.50
STATUS:>     Connecting to 192.168.1.50 (ip = 192.168.1.50)
STATUS:>     Socket connected. Waiting for welcome message...
     220 (vsFTPd 1.2.1)
STATUS:>     Connected. Authenticating...
COMMAND:>     USER root
     331 Please specify the password.
COMMAND:>     PASS **********
     530 Login incorrect.
ERROR:>     Can't log in. Still trying...

So the process is being run, It must be an authentication problem. I think that this PAM thing is the problem, cos according to the FAQ, PAM is being used. Ugghh

 

by: tncbbthositgPosted on 2004-01-21 at 05:43:27ID: 10164575

Okay,

  Set it up for anonymous access, restart it, and try to login to it anonymously.  Let me know if it works and we'll start from there.

TNC

 

by: M_A_D_C_A_TPosted on 2004-01-22 at 03:39:14ID: 10172926

I turned the anonymous_enable=NO to anonymous_enable=YES
and tried to log in at the command prompt
Now i get

[root@webserver root]# ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 1.2.1)
Name (localhost:root): ftp
331 Please specify the password.
Password:
500 OOPS: cannot change directory:/var/ftp
Login failed.
421 Service not available, remote server has closed connection

the same happens when i use the username anonymous

 

by: tncbbthositgPosted on 2004-01-22 at 05:06:41ID: 10173361

okay,

  did you set up the ftp user and group?
  did you create user nobody?

   I dont remember; did you add vsftpd: ALL to /etc/hosts.allow?

  did you create the directory /var/ftp

Let me know,
TNC

 

by: M_A_D_C_A_TPosted on 2004-01-22 at 22:52:39ID: 10181960

Hi,

i didnt make the dir ftp - so i put it in, now it works for anon users ie:

[root@webserver ftp]# ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 1.2.1)
Name (localhost:root): anonymous
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (127,0,0,1,231,166)
150 Here comes the directory listing.
-rw-r--r--    1 ftp      ftp             0 Jan 23 06:49 testfile.txt
226 Directory send OK.
ftp>

But the other users do not work still:

[root@webserver ftp]# ftp localhost
Connected to localhost (127.0.0.1).
220 (vsFTPd 1.2.1)
Name (localhost:root): root
331 Please specify the password.
Password:
530 Login incorrect.
Login failed.

 

by: tncbbthositgPosted on 2004-01-23 at 04:26:51ID: 10183234

The other users wont work if it's in anon.

Now that you know it works, try disabling anon and enabling local.
Remember, you cannot log in as root.

Try another user and post the results.

TNC

P.S., make sure the ftp user and group exist and that the users you log in with have home directories specified and that those directories exist.

 

by: M_A_D_C_A_TPosted on 2004-01-23 at 05:12:59ID: 10183422

Ok, I had a mate around today that is pretty unix savvy, the problem was that the file ftp in the pam.d directory I had named vsftpd by mistake :|

Ive disabled the anon ftp access and it all works good - users cant cd .. out of thier own directory, just the way i wanted it.

Thanks heaps for the help tho :)

 

by: tncbbthositgPosted on 2004-01-23 at 05:15:48ID: 10183436

Excellent!  I'm glad it's sorted out.

TNC

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...