LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-16-2004, 10:46 AM   #1
grim1234
Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware 10.2, Fluxbox.
Posts: 64

Rep: Reputation: 15
FTP Help please!


Hi, I want to setup a ftp server on my slack 10 box. Here's what I need to do -

1.have a dir such as /ftp/ that the user logs into.

2.deny permission to change directory to anything that isn't a sub-dir of /ftp/

3.have read access to files not in /ftp dir. could this be done with links? eg : i could serve files from /home/user/docs/ and make them look like they are in /ftp/docs/.

4.have a limited user for ftp with no access to shell or any system settings. ie - just a user for ftp.

5. could this be done with ssl or something? I've heard of sftp. would a special client be needed to connect and do standard ftpd programs support sftp?

The point of all this is to have a place where network users can upload files and share resources without resorting to windows shares. If anyone knows of a better way to do this then i'd be happy to hear about it.

Thanks a lot!

Graham.
 
Old 07-16-2004, 01:21 PM   #2
surfinhicdude
LQ Newbie
 
Registered: May 2004
Distribution: Slackware Current - 2.6 kernel
Posts: 15

Rep: Reputation: 0
Proftp comes with Slackware. I believe it can do everything you want of it. In fact, it is probably running already unless you chose not to install it or not let it start at boot. Try logging onto your comp from another computer and using your account as a name and password. I dunno how to configure it tho, never had to. It is all done via a text file in /etc i think.
 
Old 07-16-2004, 04:59 PM   #3
grim1234
Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware 10.2, Fluxbox.
Posts: 64

Original Poster
Rep: Reputation: 15
Hi, thanks for your help. I'll take a look at that ftp setup. I was specifically wondering about the lowering of priviliges and the serving of linked files if anyone knows about these issues.

Thanks,

Gir.
 
Old 07-16-2004, 05:36 PM   #4
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
I like PureFTP...................it is a more secure ftp server and does all what you want and more with a proven track record..........Some distros even ship with PureFTP out of the box........

Also, there is a Webmin module for it, too (scroll down about halfway)................
 
Old 07-17-2004, 04:51 AM   #5
grim1234
Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware 10.2, Fluxbox.
Posts: 64

Original Poster
Rep: Reputation: 15
Do you know if this can be used with linked files rather than actual files in the chrooted directory?

Thanks,

Gir.
 
Old 07-17-2004, 06:33 AM   #6
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
Since nobody has actually answered the original question, I thought I would add a few comments:

While it is true that proftpd is not regarded to be as secure as pureftp and vsftpd, it is highly configurable and is fine for DMZs and internal LANS. To limit ftp users to their home dirs add this to the global part of /etc/proftpd.conf:
DefaultRoot ~

To set up an "incoming" dir do something like
mkdir /home/ftp/incoming
chown ftp.ftp /home/ftp/incoming

Uncomment the following in /etc/proftpd.conf
# <Directory incoming/*>
# <Limit READ>
# DenyAll
# </Limit>
#
# <Limit STOR>
# AllowAll
# </Limit>
# </Directory>

You can also explicity allow and deny various ftp operations by IP address. See the documentation for more on this.

Last edited by fskmh; 07-17-2004 at 06:35 AM.
 
Old 07-17-2004, 08:32 AM   #7
Fuel
Member
 
Registered: Feb 2002
Location: Sweden, Skeldepth
Distribution: Slackware 10
Posts: 178

Rep: Reputation: 30
i cant find pre built pureftpd packages for slackware .. im blind :?
 
Old 07-17-2004, 09:17 AM   #8
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
linuxpackages.net
 
Old 07-17-2004, 09:29 AM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You can compile pure-ftpd yourself it is fast and you can add a mysql authentication option to use virtual user and store their password in a mysql table, in this way the ftp users are not present in the system, you limit the browsable directory by indicate it on a field of the mysql table.
 
Old 07-17-2004, 09:38 AM   #10
grim1234
Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware 10.2, Fluxbox.
Posts: 64

Original Poster
Rep: Reputation: 15
Thanks for all the comments so far. Does anyone know abou the linked files issue? Should the files be soft or hard links?

Thanks,

Gir.
 
Old 07-17-2004, 11:46 AM   #11
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
do man ln, you will see clearly the difference between hard and soft links
 
Old 07-17-2004, 01:31 PM   #12
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
Originally posted by grim1234
Thanks for all the comments so far. Does anyone know abou the linked files issue? Should the files be soft or hard links?

Thanks,

Gir.
Pureftp will see symlinks no problem................And it would depend on what your needs are as to using hard links or symlinks...........

Hard links will not work across drives or partitions, meaning they must be on the same partition and will not work for directories. You will have to create directories for hard links if you want ot copy the directory structure...........A hard link is another name added to the same file, so it is actually the same file with another name in a another location on the same drive or partition............

Symlinks are special files which point to another file and will work across different drives and partitions...........They are not the original file, but merely redirect you to the original................

Either way, no one will be able to browse outside of that user's home directory on the server, unless you allow it.........<EDIT> Pureftp will still not allow anyone to go outside the user's home directory, even if the symlink points to a file or directory which is outside the home directory, and the user can browse a symlinked directory as if it is part of the home directory </EDIT>...........

Last edited by thegeekster; 07-17-2004 at 01:44 PM.
 
Old 07-17-2004, 03:28 PM   #13
grim1234
Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware 10.2, Fluxbox.
Posts: 64

Original Poster
Rep: Reputation: 15
Thank you for shedding some light on this. As far as i understand then I think a good way to do this might be to setup the ftp directory on the users home directory, say as /home/ftp, then link the files to share from the users home file.

this could get pretty complicated if I use hard links because I have to create a dir for each nested dir. If I understand correctly then I can just setup symbolic links from the user dir to the ftp dir and the whole directory will be available without the ftpuser having real access to the user dir? Is this a security risk? if i've misunderstood please enlighten me.

Thanks,

Gir.
 
Old 07-17-2004, 11:22 PM   #14
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
That's it in a nutshell...............A couple of things to consider is Pureftp works better as a standalone server (running in daemon mode) rather than using the inetd superserver, and the configuration is mostly done on the command line using switches and args...........So be sure to RTFM.........You're questions about security should be answered as well.........

It also comes with some nifty tools for passwds, it's own db (or you can use other ones), a bandwidth monitor for monitoring who's connected to the server, and more.......


PS: If all you're doing is sharing files, why not set up something similar to what a central file server does in a local network where the files are stored on the central server (in this case it could be a common directory), and then link it to each user's home directory?.......Each user can have his own subdirectory in that common directory, but is shareable to others..............Or set the perms to where only the owner of the file can change it, but others can read the file..........

Last edited by thegeekster; 07-17-2004 at 11:37 PM.
 
  


Reply



Posting 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ftp(through web site access to ftp server) kelper Linux - Software 4 07-03-2015 05:14 PM
ftp server - Pure ftp - logs in OK but no files visible tp11235 Linux - Networking 2 08-30-2005 05:11 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 04:24 PM
problem with ftp on mandrake 10.1 Official, ftp speeds system wide (anybody noticed?) equinox Mandriva 15 11-10-2004 02:07 PM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration