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

foo-pre not working on arm7 #5

Open
glboy opened this issue May 2, 2018 · 4 comments
Open

foo-pre not working on arm7 #5

glboy opened this issue May 2, 2018 · 4 comments

Comments

@glboy
Copy link

glboy commented May 2, 2018

ive used foo-pre many times in the past and appreciate the glftpd teams work on the project, however im having some difficulty with running it on arm7 architecture

model name : ARMv7 Processor rev 3 (v7l)
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae

compilation is fine and easy, however when attempting to pre, the source and destination directory are incorrectly identified as not existing by foo-pre

  • Destination for pre will be the testing section..
  • Hm, destination section's path (/site/incoming/testing) doesnt exist ?

the path /site/incoming/testing certainly exists and ive verified the config many times to ensure its right.

section.testing.name=testing
section.testing.dir=/site/incoming/testing
section.testing.gl_credit_section=0
section.testing.gl_stat_section=0

i also tried removing the destination directory check from the source code, and recompiling. when I did this, it then said the source directory doesn't exist.

ive tried multiple versions of glftpd, i'm currently testing on
glFTPd 2.09 BETA1 (Mar 27 2018) 32BiT Linux+TLS(OpenSSL 1.1.0h 27 Mar 2018)+SSP

i tested an identical config with a very old alternate pre script called 'pre2 1.6' and this works fine, however it lacks the modern features of foo-pre

thanks for any help you can offer

@silv3rr
Copy link
Contributor

silv3rr commented May 4, 2018

assuming you're using latest version, no compiler issues, pre.cfg is setup correctly, dest is not a symlink etc.

foo-pre first tries a rename(src, dest) and if that fails it will try mv (move.external in pre.cfg), for example if src and dst are on different partitions
you could try commenting lines 839-842 and recompile to force it to always use mv :

rc = rename(src, dest);

if its still not working: which OS and libc? is anything logged to /ftp-data/logs/foo-pre.log? are From:/To dirs in ftp status log correct after 'site pre'?

@glboy
Copy link
Author

glboy commented May 18, 2018

hi

sorry for the delayed response, there is nothing logged to foo-pre.log except for START and GROUP lines, nothing to indicate any errors

OS is Ubuntu 16.04.4 TLS
ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu10) 2.23

Thanks your suggestion of commenting out lines 839-842 has indeed worked, this is a working fix for me

@silv3rr
Copy link
Contributor

silv3rr commented May 28, 2018

dont think libc is the issue here, specially since you don't mention any other errors or segfaults etc

seems for some reason it can't expand section dir to real path (in section_expand_path()).
when you commented out the check next it does in pre_handler is indeed checking source.
it could be you hit a (arm only?) bug.

i'm already working on some other fixes etc in my fork, i'll add a pre.cfg option to force using mv.

@silv3rr
Copy link
Contributor

silv3rr commented Jul 13, 2018

https://github.com/silv3rr/foo-tools/releases/tag/foo-tools-v1.20-20180713

pre.cfg:
# force always using external move (1 = yes, 0 = no)
move.force.ext=1
(could use some testing)

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