Bekijk de volledige versie : FTP change root directory?

22-03-2005, 17:51
I'm running firmware Firmware v1.9.2.7 CR4 [Oleg] on a WL-500g. Also I have a LaCie 200Gb USB harddrive connected to the USB port. On this drive there are two partitions, one 32Gb FAT 32 for when I take the drive out to meet a windows machine, and one EXT3 partition for normal usage.

The partitions get mounted in /tmp/harddisk and /tmp/harddisk/part1 respectively. The problem with this is that the FTP-server always uses /tmp/harddisk as root, where i want it to use /tmp/harddisk/part1 as root. I have tried just creating symlinks, but apparently those don't work on Fat32.

So.. how do i tell the FTP server to use another root? As I understand it, stupid-FTP makes its config on-the-fly..

I have found the stupid-ftpd.conf in the /tmp directory.. is it enough to edit that one, add it to /usr/local/.files and then flashfs save, flashfs commit, flashfs enable?

is it correct that stupid-ftpd doesnt understand symlinks? I changed the stupid-ftpd.conf and restarted stupid-ftpd to see if it would work. It does, the root has changed, but i can't go into symlinked folders. If i try to do so, it sais it's not a directory?

ok, I answered my own questions.. stupidftpd doesnt seem to understand symlinks. If i disable the ftp on the webinterface, my usb disc doesnt get mounted. So the answer was to enable it on the webinterface, copy the stupid-ftpd.conf to /etc, edit it so that the folders i want it to use get used, and enter the file into the .files file. After this i edited my post-boot and added a 'killall stupid-ftpd' followed by al '/usr/sbin/stupid-ftpd -f /etc/stupid-ftpd.conf

after rebooting the ftpd was running and the users logged in to the correct folders. Problem solved :)