hfiref0x / LightFTP

Small x86-32/x64 FTP Server
BSD 2-Clause "Simplified" License
232 stars 83 forks source link

Ubuntu build, not functioning #3

Closed LindenCX closed 7 years ago

LindenCX commented 7 years ago

Hi,

Built on Ubuntu 16.04:

`/Release# make Building file: ../cfgparse.c Invoking: GCC C Compiler gcc -std=c99 -O3 -Wall -Wextra -c -fmessage-length=0 -Wno-unused-parameter -Wno-unused-result -fno-ident -MMD -MP -MF"cfgparse.d" -MT"cfgparse.o" -o "cfgparse.o" "../cfgparse.c" Finished building: ../cfgparse.c

Building file: ../ftpserv.c Invoking: GCC C Compiler gcc -std=c99 -O3 -Wall -Wextra -c -fmessage-length=0 -Wno-unused-parameter -Wno-unused-result -fno-ident -MMD -MP -MF"ftpserv.d" -MT"ftpserv.o" -o "ftpserv.o" "../ftpserv.c" Finished building: ../ftpserv.c

Building file: ../main.c Invoking: GCC C Compiler gcc -std=c99 -O3 -Wall -Wextra -c -fmessage-length=0 -Wno-unused-parameter -Wno-unused-result -fno-ident -MMD -MP -MF"main.d" -MT"main.o" -o "main.o" "../main.c" Finished building: ../main.c

Building target: fftp Invoking: GCC C Linker gcc -o "fftp" ./cfgparse.o ./ftpserv.o ./main.o -lpthread Finished building target: fftp`

Upon trying to fire up fftp it just ends, no error, no message, nothing. Doesn't make a log either.

Do you have a working build already available for Linux somewhere I can grab to fire up.

Thank you.

hfiref0x commented 7 years ago

Hello,

you need to change config first. Put fftp and fftp.conf in same directory.

Open fftp.conf and change these lines:

logfilepath=/home/ExampleUserName/ExampleDataDirectory/fftplog

change it to point to the directory where you want log to be created, for example if your user name is "user" and directory you want to use for logs is "/home/user/ftp" then

logfilepath=/home/user/ftp/fftplog

where fftplog is log file name.

Next, change settings for default ftp users, change their root directory

[anonymous] pswd=* accs=readonly root=/home/ExampleUserName/ExampleDataDirectory

[uploader] pswd=* accs=upload root=/home/ExampleUserName/ExampleDataDirectory

[ftpadmin] pswd=* accs=admin root=/home/ExampleUserName/ExampleDataDirectory

root=/home/user/ftp/root

Example virtualbox_ubuntu16 04_16_05_2017_18_48_04

LindenCX commented 7 years ago

I should have replied last night, this was the result of IPv6 being enabled. (there was still an IPv4 address available and setup in the conf) But it looks like fftp doesn't like IPv6 at all. (It just starts and instantly stops, no error output)

If anyone runs into it not starting the future and ends up here, simply edit /etc/sysctl.conf and append the following:

net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1

and reload with: sudo sysctl -p

And that will bring up fftp.