Solved

How to create a pro-FTPd user on linux ?

Posted on 2008-10-24
9
364 Views
Last Modified: 2013-12-16
Dear Experts:

I would like to create a user which can upload and download files and directories by FTP, but without having access to all my server directories: just its home directory (and all its subdirectories). Also, I don't want to give him access to console (I mean, accessing using telnet or putty on ssh).
 
My server is a dedicated server, which I installed xampp (from apache-friends) over suse-linux enterprise 10 server. The FTP server is pro-FTPd, which is included whan installing xampp.

It's possible to create this restricted user ?

Many thanks.
0
Comment
Question by:gplana
  • 5
  • 4
9 Comments
 
LVL 43

Expert Comment

by:ravenpl
ID: 22802680
Sure, first create system use without password (password should be mangled like '*' or '!!' - meaning one cannot login).

Then to the proftpd.conf You may add

UserPassword theUsername theCryptedPassword

where the theCryptedPassword is output from
# perl -e 'print crypt("plainPassHere", rand(100))'
0
 
LVL 15

Author Comment

by:gplana
ID: 22804105
Thank you for your answer.

I understand that this prevents user to login by telnet or SSH. My doubt now is if the crypted password is the same as it appears on the shadow file ?

Also, what I need now is "just" to restrict this FTP user to allow access only to its own home directory. Is this possible ?
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 22804540
> My doubt now is if the crypted password is the same as it appears on the shadow file ?
No, it's weak des based has (shadows has md5 or blowfish or sha-*)

> Also, what I need now is "just" to restrict this FTP user to allow access only to its own home directory. Is this possible ?
DefaultRoot ~
# http://www.proftpd.org/docs/directives/linked/config_ref_DefaultRoot.html
0
 
LVL 15

Author Comment

by:gplana
ID: 22804875
Thank you for your answer. Now I understand a little more.

However, I haven't been able to login with my new created user. I attach my proftpd.conf file in order you can show me if I'm doing something wrong.

User tsavellana already exists on my passwd and shadow files, however, I put an * at the password field on shadow file in order this user cannot login by using putty.

Thank you for all. Best Regards.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 15

Author Comment

by:gplana
ID: 22804888
Here is the attached file. I changed its ".conf" extension to ".txt" in order this site doesn't allow ".conf" files.
proftpd.txt
0
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 22815816
UserAlias tsavellana ftp
says to proftpd that if someone uses "tsavellana" as username then authenticate against "ftp" user. So in Your case You want
UserPassword ftp 58Ydm7H5BbRmMT
0
 
LVL 15

Author Comment

by:gplana
ID: 22817401
Sorry, but it seems DefaultRoot clause doesn't restrict anything.

Maybe my executing ftp server process is a standard FTP installed automatically when I installed linux (SUSE enterprise 10) and proftpd is not executing properly ?

I say that because I tried to make some changes on proftpd.conf file and it seems they doesn't take effect.

Thank you.
0
 
LVL 43

Expert Comment

by:ravenpl
ID: 22819572
> Sorry, but it seems DefaultRoot clause doesn't restrict anything.
Right - it has no meaning in <Anonymous > clause. <Anonymous /here> already restricts You to /here - no point in DefaultRoot here.

> I say that because I tried to make some changes on proftpd.conf file and it seems they doesn't take effect.
You have restarted proftpd and it was success?
0
 
LVL 15

Author Comment

by:gplana
ID: 22820390
Yes, I restarted it with appearly no errors. However, when restarting it says "no process running" as if it wasn't abel to kill the previous process.

I installed xampp from apache friends over a standard suse linux, and now I think there was another FTP server installed before, which I suppose can be in conflict with xampp's proftpd component.

I understand that this is another question, so do you want I open another question with its own points ?

Thank you.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now