LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   FTP Users and Shares (https://www.linuxquestions.org/questions/linux-newbie-8/ftp-users-and-shares-59813/)

Thermos 05-14-2003 02:45 PM

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.

MasterC 05-14-2003 10:58 PM

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

Thermos 05-15-2003 01:35 AM

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???

MasterC 05-15-2003 03:09 AM

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

Thermos 05-15-2003 03:47 AM

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.

MasterC 05-15-2003 06:22 AM

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

Thermos 05-15-2003 02:35 PM

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!

MasterC 05-15-2003 08:48 PM

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

gwroy20 05-22-2003 03:19 PM

This helped me out as well, thanks.


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