LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2003, 03:45 PM   #1
Thermos
Member
 
Registered: Feb 2003
Posts: 38

Rep: Reputation: 15
FTP Users and Shares


im wanting to setup an ftp. i just installed proftpd. and basically i would like all users with there own user names to logon in /home/ftp and in that folder have links to the shares, like...
games, mp3s, uploads, etc.

and when they go up out of that folder it return them to the /home/ftp.

i can do this quite easily bulletproof or servu in winblows, but dont have a clue in linux. ive read through many posts and looked at proftpd.com some.

can some one enlighten me or point me in a direction please.

thnx in adv.
 
Old 05-14-2003, 11:58 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Normally you cannot "symlink" to a folder outside, or below rather, your ftp root (/home/ftp). So you might be better off creating a seperate tree for all the directories you want to share to them, something like:
/var/ftp
And have subdirectories with the applications you want to share. Then, edit your proftpd.conf file to have an entry:
DefaultRoot /var/ftp
And then everyone who ftp's in will start out in that folder.

Cool
 
Old 05-15-2003, 02:35 AM   #3
Thermos
Member
 
Registered: Feb 2003
Posts: 38

Original Poster
Rep: Reputation: 15
i made symlinks in /var/ftp and set default root to that folder.
it shows up fine when i logon w/ flashfxp in windows. but it says access denied when i try to open any of the links.

do symlinks work in windows???
 
Old 05-15-2003, 04:09 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
The problem is not OS specific. You cannot access a file that virtually does not exist. DefaultRoot means "This is where the / of the drive is". Meaning, there really isn't anything outside of that directory tree. That's why you should copy the files, symlinks won't work.

Cool
 
Old 05-15-2003, 04:47 AM   #5
Thermos
Member
 
Registered: Feb 2003
Posts: 38

Original Poster
Rep: Reputation: 15
i cant copy all off the files there or to any one place. we're talkin about on an average 200gigs of stuff on 2 pcs. maybe im misunderstanding you but theres gotta be a better way.
 
Old 05-15-2003, 07:22 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You can mount above it. But then you'd have to make them all part of a group that owns those mount points.

I'll try to explain it better:

DefaultRoot /var/ftp

This entry tells the FTP Client that:
/var/ftp is now /
So as far as the FTP client is concerned, that is the uppermost directory, or lowermost whichever way you look at it. It's the equivilent to you going to your / partion:
cd /
And then trying to go lower:
cd ..
You can't.
So, now, assuming you understand that, if /var/ftp is now seen as / then anything "below" that is non-existant. Symlinks pointing outside of your root partition (DefaultRoot) are not there. It's pointing nowhere. Look at the symlink:
file ---> /home/data/file
Well since /var/ftp is now / and in /var/ftp there is no /home/data, /home/data/file does not exist.
So...
You either:
1. Have to move the data above it:
/var/ftp/data
OR
if this data is on seperate partitions, you can mount those partitions at directories accessible by these users, above the /var/ftp directory. To do this, create the directories:
mkdir /var/ftp/data
And then create an entry in fstab or mount with options:
mount -t ext3 /dev/hdx /var/ftp/data
Assuming it's an ext3 partition the users will have access to it by default. If it's something else, you'll need to use the -o (option) to specify options, such as umasks.

HTH

Cool
 
Old 05-15-2003, 03:35 PM   #7
Thermos
Member
 
Registered: Feb 2003
Posts: 38

Original Poster
Rep: Reputation: 15
ok, so i think ive got it now.
ive got DefaultRoot /var/ftp in proftp.conf
and i decided symlinks werent gonna work so ive used mount
i had trouble mounting in fstab so what i did was in /etc/rc.local
i added mounts for all my shares...like...

mount --bind /storage/apps.iso /var/ftp/apps.iso
mount --bind /mnt/games /var/ftp/games
etc...

this seems to work fine. the only thing i have to do now is make user accounts and give the upload folder rights to the proper ppl.
hopefully that wont be that hard.

thnx a ton for the help guys!
 
Old 05-15-2003, 09:48 PM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You're Welcome, and I'm glad you got it sorted out. If you still want to try the fstab way, go ahead and let us know a bit more info about what you are trying to mount, maybe the filesystem it exists on, and what you've tried.

Cool
 
Old 05-22-2003, 04:19 PM   #9
gwroy20
Member
 
Registered: Mar 2003
Location: New York City
Distribution: Slackware 9.1, FreeBSD 5.2.1, OpenBSD 3.3
Posts: 89

Rep: Reputation: 15
This helped me out as well, thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to setup FTP users only users on LInux Fedora Soujiro Linux - Newbie 8 09-13-2010 08:34 AM
FTP Server Up and running... how do I hide ftp users from local login screen? joe1031 Mandriva 2 03-18-2005 05:24 PM
Samba Shares & Users Raggit Linux - Software 4 02-14-2005 05:36 AM
samba: hide shares from some users v3rb0 Linux - Software 4 08-10-2003 02:12 AM
how can I restrict ftp users listing files from a pure-ftp server adrianmak Linux - Networking 2 12-31-2002 09:23 AM


All times are GMT -5. The time now is 08:25 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration