Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path issues #17

Closed
Spacewalker2 opened this issue Mar 1, 2019 · 10 comments
Closed

path issues #17

Spacewalker2 opened this issue Mar 1, 2019 · 10 comments

Comments

@Spacewalker2
Copy link

If the path parameter on cli is something like uftpd … Downloads and not uftpd … ~/Downloads I get a ls: Access failed: 550 No such file or directory. error message.

Sometimes I get error messages like below. But I'm not sure what it means and I'm not able to reproduce it with other paths. Besides everything in my $HOME is writable to uftpd. The only difference here is that I used a chattr +i on the files in the folder but when I cut the last element of the path I can access the folder and download the files.

7333> Initializing ...
7333> FTP root <path> writable, possible security violation!
7333> Failed initializing, exiting.

Thanks for this cool tool!

@troglobit
Copy link
Owner

The first part of this report I cannot make heads or tails of. What do you do to get ls: Access failed ...?

The second part is an attempt at helping users not shooting themselves in the foot. I just noticed it's a little buggy ... but the intention is: If you really want to serve a folder that is writable to uftpd, then start it with uftpd -o writable PATH

@troglobit
Copy link
Owner

The latter part of your report is now fixed, it now always complains about security violation, unless -o writable.

@troglobit troglobit reopened this Mar 2, 2019
@Spacewalker2
Copy link
Author

Sorry for the misconceptions. The first part is that a relative path as parameter isn't working here. I guess the shell expands ~/Downloads to a full path and this works here all the time.

About the second part. Does it mean that the ftp root isn't writable except I use -o writable but sub-directories are writable every time?

@troglobit
Copy link
Owner

No worries, I just cannot reproduce the first part so anything you could assist with to help reproduce it would be greatly appreciated.

Second part: Yes. This to support an "upload/" sub-directory or similar.

@Spacewalker2
Copy link
Author

Spacewalker2 commented Mar 2, 2019

I'm not sure if this helps. If I execute uftpd -l debug -n -o tftp=0,ftp=12345 ~/Pictures/eBay/ then it is working as expected.

Version: 2.6

$ uftpd -l debug -n -o tftp=0,ftp=12345 Pictures/eBay/
15221> Initializing ...
15221> Serving files as PID 15221 ...
15221> Starting services ...
15221> Opened socket for port 12345
15221> Starting FTP server on port 12345 ...
15221> Serving files from Pictures/eBay ...
15221> Created new client session as PID 15224
15224> Client connection from 127.0.0.1
15224> Sent: 220 uftpd (2.6) ready.

15224> Recv: FEAT 
15224> Sent: 
211-Features:
 EPSV
 PASV
 SIZE
 UTF8
 REST STREAM
 MLST modify*;perm*;size*;type*;
211 End

15224> Recv: OPTS UTF8 ON
15224> Sent: 200 UTF8 OPTS ON

15224> Recv: USER anonymous
15224> Guest logged in from 127.0.0.1
15224> Sent: 230 Guest login OK, access restrictions apply.
15221> Starting services ...
15221> Opened socket for port 12345
15221> Starting FTP server on port 12345 ...
15221> Serving files from Pictures/eBay ...
15221> Created new client session as PID 15224
15224> Client connection from 127.0.0.1
15224> Sent: 220 uftpd (2.6) ready.

15224> Recv: FEAT 
15224> Sent: 
211-Features:
 EPSV
 PASV
 SIZE
 UTF8
 REST STREAM
 MLST modify*;perm*;size*;type*;
211 End

15224> Recv: OPTS UTF8 ON
15224> Sent: 200 UTF8 OPTS ON

15224> Recv: USER anonymous
15224> Guest logged in from 127.0.0.1
15224> Sent: 230 Guest login OK, access restrictions apply.

15224> Recv: PWD 
15224> Sent: 257 "/"

15224> Recv: PASV 
15224> Data server port estabished.  Waiting for client connnect ...
15224> Sent: 227 Entering Passive Mode (127,0,0,1,130,31)

15224> Event on data_listen_sd ...
15224> Client PASV data connection from 127.0.0.1:52580
15224> No pending command, waiting ...
15224> Recv: LIST 
15224> Compose path from cwd: /, arg: 
15224> Server path from CWD: /
15224> Resulting non-chroot path: Pictures/eBay/
15224> Failed realpath(Pictures). Error 2: No such file or directory
15224> Sent: 550 No such file or directory.

15224> Recv: QUIT 
15224> Sent: 221 Goodbye.

15224> Client exiting, bye
15224> FTP Client session ended.
^C15221> Recieved signal 2, exiting ...

@troglobit
Copy link
Owner

Ah, thanks reproduced! :)

Looking into it ...

@troglobit
Copy link
Owner

There, pretty sure I fixed it! :-)

@Spacewalker2
Copy link
Author

Thanks for the great work you have done now and before! If it isn't too much to ask then maybe you can create a new release please. It would allow me to use AUR for upgrading.

@troglobit
Copy link
Owner

Working on it! ;-)

@troglobit
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants