Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I do not want them to see the directories in Red box
but only the blue ones in which they will upload / download files.
also the files shall be downloadable via http to others..
How can that be done?
P.S: Please let me know the full commands as i'm new so good at linux.
It's a matter of adjusting the configuration files and then restarting the daemon (FTP server). Normally, you'll find any such information in the man pages ("manual pages") of the FTP server program you're using. Without knowing exactly what you're using it's not possible to tell you exactly what to do anyway. I could tell you for ProFTPd, but I don't know if it's right for you.
This is "uname -a" - it's clear that you're using an old Debian version, no more, no less; it's the last (not the latest) stable (3.1 - dubbed "Sarge"), judging from the kernel (I could be wrong).
Suggestion: try (on a root terminal):
Code:
# dpkg -l | grep ftp
and put the results here (any lines starting with "ii" are interesting).
ii ftp 0.17-12 The FTP client.
ii psa-ftputil 8.2.0-debian3. Plesk-packaged version of ftputil module
ii psa-proftpd 1.3.0-debian3. ProFTPD -- Professional FTP Server.
ii psa-proftpd-in 1.3.0-debian3. ProFTPD -- Setup for inetd operation.
Okay, now it's easy
I'll presume you're on a root cli.
Locate /etc/proftpd.conf - it will be there if the system hasn't been setup in a customized way; if not, do
Code:
# whereis proftpd
to find it.
Do
Code:
# cat /etc/proftpd.conf | grep DefaultRoot
If there's nothing, replace "DefaultRoot" with "defaultroot" to make sure. If there is no such line, you'll have to add it (at the end of the file is fine).
Use your favourite text editor to either change the line you found to
Code:
DefaultRoot ~
or add that line to the conf file. This'll restrict FTP users who are also system users to their home directory. To adjust the directory your users should be confined to to something else, simply enter the full path instead of "~".
DefaultRoot's already set to each users' home directories for the group "psacln"; you can either change the group right there or scan (i.e. read) the conf file to find the place where to set the group that can use the server! But be careful and take care to look for the right instructions/settings.
And for SSH, you'll have to have sshd installed and running, which has nothing(!) to do with proFTPd and will use a different configuration file. However, on login (if configured that way), each user will be at least able to read and control the stuff in his/her home directory. It's a nice thing to offer to users, but beware of security hazards... In short: Confine your users to their home directories, and be careful who you offer which rights...
i have the same problem and when i use the command before
i have those line:
ii dpkg-ftp 1.6.10 Ftp method for dselect.
ii ftp 0.17-12 The FTP client.
ii ncftp2 2.4.3-14 A user-friendly and well-featured FTP client
rc proftpd-common 1.2.10-15sarge Versatile, virtual-hosting FTP daemon
rc proftpd-mysql 1.2.10-15sarge Versatile, virtual-hosting FTP daemon (with
ii pure-ftpd 1.0.19-4 Pure-FTPd FTP server
ii pure-ftpd-comm 1.0.19-4 Pure-FTPd FTP server (Common Files)
how can i resolve this problem (i can't connect to the ftp server).
DefaultRoot's already set to each users' home directories for the group "psacln"; you can either change the group right there or scan (i.e. read) the conf file to find the place where to set the group that can use the server! But be careful and take care to look for the right instructions/settings.
And for SSH, you'll have to have sshd installed and running, which has nothing(!) to do with proFTPd and will use a different configuration file. However, on login (if configured that way), each user will be at least able to read and control the stuff in his/her home directory. It's a nice thing to offer to users, but beware of security hazards... In short: Confine your users to their home directories, and be careful who you offer what rights...
hlimaem: yours is probably pureFTPd (for proFTPd, the actual server package is missing, but may have been there at some time in the past, judging from the support packages' left-overs' presence); since I've never used it, I'm not proficient in configuring it. But a good start would be to use
Code:
$ man pure-ftpd
At the end of each man page, you'll find a list of correspondig files; I'd bet on something with ".conf" at the end lying around somewhere (my best guess is /etc). Read the documentation carefully, hope for a sample (there normally is one!). Also helpful:
Code:
$ which pure-ftpd
You can do all that without being root - a good thing to take a look first before meddling with configuration! When you're ready to start editing the configuration file(s), switch to root (or use "sudo", preferably), than do something like
Code:
# gedit pure-ftpd.conf
(supply your favourite editor and your actual configuration file's correct name here) and start do your thing.
Sorry but i didn't understand what you asking me to do for getting solution to my problem.
The problem i have, that when i try to connect by ftp server using for example (filezilla or smartftp) i have those message: Status: Connecting to My_IP:21...
Status: Connection established, waiting for welcome message...
Error: Could not connect to server
Also when i try this command to test the server in SSH mode /usr/sbin/pure-ftpd -S 127.0.0.1,21 -c 30 -C 1 -l puredb:/etc/pureftpd.pdb -x -E -j -R
I have this message: Unable to start a standalone server: Address already in use
I've also changed proftpd.conf with "ServerType standalone" the same messages appears.
When i'm trying this command "dpkg -l | grep ftp"
ii dpkg-ftp 1.6.10 Ftp method for dselect.
ii ftp 0.17-12 The FTP client.
ii ncftp2 2.4.3-14 A user-friendly and well-featured FTP client
rc proftpd-common 1.2.10-15sarge Versatile, virtual-hosting FTP daemon
rc proftpd-mysql 1.2.10-15sarge Versatile, virtual-hosting FTP daemon (with
ii pure-ftpd 1.0.19-4 Pure-FTPd FTP server
ii pure-ftpd-comm 1.0.19-4 Pure-FTPd FTP server (Common Files)
Did i have more than one configuration for FTP connection.
I don't know what to do to resolve this problem.
Can i remove all installation of FTP configurations in my server and can you give all the exacts steps to configure FTP.
Thank you for your precious help.
I think you're not running proFTPd, so it's not really probable that changing the /etc/proftpd.conf file will help in any way...
The messages tell you that an FTP daemon (your server) is already started (and it appears to be pure-ftpd - that's what the second error message is saying when you're trying the /usr/bin/pure-ftpd line), but there's probably one of two things happening:
1. Did you try to connect to 127.0.0.1:21 (I ask because of "My_IP:21" in your last post)? If you were trying your own external IP from inside your WAN connection, you'll not be able to connect, receiving exactly the error message you report. "localhost", OTOH, should work (which is 127.0.0.1 - but you know that, obviously) - if there's a running daemon to connect to, of course. As I said, the error message indicates this should be the case
2. Maybe a firewall (software or hardware - probably the first, though, because that could even imped local connections) blocks port 21. If trying from the outside, you'll have to redirect FTP traffic to the server in question before it can work. I can't tell you exactly how to do this, though, because it's probably done by your router or cable modem.
I'm not sure if I'm on the right track here, but I want to make sure that the basic setup is correct. I doupt that there are two different daemons running; you could check, though:
Code:
$ sudo ps axu | grep ftp
- normally, the daemon in charge says something like "accepting connections". You'll also want to locate your pure-ftpd config files just in case they need some work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.