# [SOLVED]vsftpd and share directories

## apoorvkhurasia

Hi

I am running vsftpd on gentoo. I wish to make some files public but the problem is that my partition structures does not allow me to put them all on one single partition. So they end up taking three different partitions (all are some 10GB in size and I have to share some 25 GB of data). Now the problem is that vsftpd has only one share dir (correct me if I am wrong on this) which is /var/ftp. What can I do to share all this data without restructuring the partition tables?

Thanks for all help, in advance

----------

## UberLord

You could symlink dirs to the partitions in the share

Or if it's in a chroot, you can mount --bind.

----------

## apoorvkhurasia

Thanks for your response.

simlink does not work. I have tried that before but users get this message (failed to change directory). And they are not in a chroot partition (one of them is infact a vfat partition).

----------

## UberLord

Does the user have permission to descend into the directory?

----------

## apoorvkhurasia

Yes.

----------

## apoorvkhurasia

i even tried changing the ownership of the dirs to ftp:ftp and then soft linking them...but that did not work out. Still getting the error "failed to change dir". Anybody having a solution or shld I go for a different ftp server?

----------

## unaos

HHAHAHAHAHAHAHAHA!!! MAN .... just ROFL.

welcome to hell )))))))))

your life is now divided in two parts, and the second part calling "Gentoo vs ftpd".

anyways m8 if u figured something out that helped out to resolve issue, please let me now  :Smile: 

----------

## ppurka

Simply create three new empty directories under /var/ftp and mount --bind the other 3 directories (which you want to share) to these three empty directories.

----------

## apoorvkhurasia

 *ppurka wrote:*   

> 
> 
> Simply create three new empty directories under /var/ftp and mount --bind the other 3 directories (which you want to share) to these three empty directories.

 

Thanks man!!! I don't know how to thank you........this worked........such an elegant thinking.....thanks a lot again

 *unaos wrote:*   

> 
> 
> anyways m8 if u figured something out that helped out to resolve issue, please let me now 

 

See above....it worked.

----------

## unaos

lets specify the schema

# mount

/store01/basedir01 on /var/ftp/dirs/basedir01 type none (ro,bind)

/store01/basedir02  on /var/ftp/dirs/basedir02 type none (ro,bind)

/store01/basedir02 on /var/ftp/dirs/basedir03 type none (ro,bind)

# ls -l /store01/

drwxr-x---  7 ftp   ftp   168 îÏÑ 24 16:32 basedir01

drwxr-x---  7 ftp   ftp   168 îÏÑ 24 16:32 basedir02

drwxr-x---  7 ftp   ftp   168 îÏÑ 24 16:32 basedir03

----------

