troglobit / uftpd

FTP/TFTP server for Linux that just works™
https://troglobit.com/projects/uftpd/
ISC License
182 stars 32 forks source link

No such file or directory (what?) #35

Closed takusuman closed 3 years ago

takusuman commented 3 years ago

I've just set it up here in my home server, i've also set the ftp directory and then ran it as root. When i've tried to access it via tnftp and run ls, it returned "No such file or directory.".

What is happening here? Could someone tell me if it's just my fault and how could i fix it?

My server log: image

My client: image

Sorry for any bad english.

troglobit commented 3 years ago

How did you start it, as an inetd service, or stand-alone daemon, what arguments to uftpd did you use?

takusuman commented 3 years ago

How did you start it, as an inetd service, or stand-alone daemon, what arguments to uftpd did you use?

I've started it as a stand-alone daemon, and used these args: uftpd -n -l debug

troglobit commented 3 years ago

Then tries to run from the ftp user's $HOME directory. I'm guessing you don't have an ftp user in your system?

takusuman commented 3 years ago

Then tries to run from the ftp user's $HOME directory. I'm guessing you don't have an ftp user in your system?

Yes, i have. image

takusuman commented 3 years ago

It also says that it's serving files from my FTP directory, so i don't think that's this is the problem. image

troglobit commented 3 years ago

Weird, works for me over here. Same setup, but a system user at lower UID and /srv/ftp as home directory. I'm using ncftp to test...

Edit: just tested with tnftp, and it works as well. Sorry, don't know what could be the problem here.

takusuman commented 3 years ago

Weird, works for me over here. Same setup, but a system user at lower UID and /srv/ftp as home directory. I'm using ncftp to test...

Edit: just tested with tnftp, and it works as well. Sorry, don't know what could be the problem here.

I will try to recompile it.

Edit: Yeah, still getting the same error.

troglobit commented 3 years ago

Really running out of ideas, have you checked that uftpd has read (and execute for dirs) permissions for the /usr/str0/ftp directory?

takusuman commented 3 years ago

I think yes, because it's running as root; so, in theory, it has to have them.

troglobit commented 3 years ago

Actually, when running as root and an ftp user exists, uftpd drops privilieges to that user.

takusuman commented 3 years ago

Oh... O.k., i will test here.

Edit: Now it works. Sorry for being an idiot, but at least may this thread solves another person's problem.

troglobit commented 3 years ago

No problem, it's not obvious how it works. Great to hear you got it working at least, take care! :)