Open rhkarls opened 1 month ago
I did some additional testing with SFTP, and the issue might be related to the path not being correct when trying to read the locations.json file when there is an path provided with the hostname? Might be the same as or related to https://github.com/ArtesiaWater/field_form/issues/9 "issue 2: upl / download uses relative path"
I added a new user (ffuser
), and restricted the SFTP access of that user to a specific directory to avoid having to provide a path in the hostname (e.g. <local-ip>/home/username/fieldform/
as above) - following https://www.tecmint.com/restrict-sftp-user-home-directories-using-chroot/ ("Restrict Users to a Specific Directory").
settings in the app with the new user
Hostname
: <local-ip>
(i.e. no path here, compared to the hostname+path in the initial issue description)Path
: ffuser
locations.json
is now located under /sftpusers/chroot/ffuser/locations.json
With this setup I'm able to read the locations file and upload measurements
Hi @rhkarls,
Thanks for reporting the issue. I was on holidays, so did not have time to look into the problem.
Maybe something goes wrong when interpreting the path in hostname for SFTP-servers. I did have to use a different workflow compared to regular FTP-servers regarding subfolders in the path. Is it possible to send a private message with the credentials of the SFTP-server, so I can debug the problem?
Apart from the README there is no additional documentation yet.
Hi @rubencalje - thanks for the response and sorry for the late reply. I have a very busy period right now and ahead of me, but I will try to get a temporary server setup that you can access (the one I used earlier was on a private network) - it might take a while though. I will contact you privately with the details once I get around to it. Thanks for you patience, and for providing and working on FieldForm!
I'm attempting to setup fieldform for testing purposes but I get an error when trying to sync with a SFTP server.
Error message is
Error: unable to download locations.json
README.md
/home/username/fieldform/locations.json
Hostname
:<local-ip>/home/username/fieldform/
Path
: blankHostname
:<local-ip>/home/username/
andPath
set tofieldform
Use SFTP
is checkedThe
locations.json
file is uploaded to the server with the same user as I login with in the app (username
)Additional question: I'm not able to find any documentation apart from what is in the README - is there any more documentation somewhere?