Procedures SFTP purge my home directory

raheelajk wrote on Thursday, October 03, 2013:

Hi guys,

When I tried to connect Procedures module to my remote server with SFTP it completely purged my whole public_html, public_ftp directory and their contents. This is a real big issue. I tried it several times by restoring my server but everytime same result. My provider structure is as follow.

Usage: Production
Protocol: SFTP

Remote Host: mysite.com:22

user: username
password: pass

Orders path: Orders
Results path: Results

I don’t see anything wrong with it. Can anyone give me inside of what I am doing wrong to cause this issue?

Thanks,

sunsetsystems wrote on Thursday, October 03, 2013:

Are you talking about the SFTP server’s directories, or the OpenEMR server’s? Linux or Windows? What OpenEMR version?

If the SFTP server, try connecting manually to it with the “sftp” utility (or whatever you have) and see what directory it defaults to, and make sure the Orders and Results subdirectories exist at that level. If not, you likely have some sort of configuration error with that server. In any case it appears that permissions are too broad for sftp users.

Rod
http://www.sunsetsystems.com/

raheelajk wrote on Thursday, October 03, 2013:

I am testing 4.1.2 version on Linux Server and I am talking about my SFTP server directories.

My SFTP user defaults to /home/[user] and I believe that’s where the issue is. But connecting to that directory should not wipe out public_html, public_ftp etc contents. Correct?

I have placed Order and Results subdirectories within public_html. Can we make connection to look in public_html?

sunsetsystems wrote on Thursday, October 03, 2013:

Should be able to. The path you specify for Orders or Results should be whatever the path is to the directory after sftp login. So try for example public_html/Results instead of just Results. On a manual login, make sure a “cd” to that same path works. Note that in Linux paths are case-sensitive.

Rod
http://www.sunsetsystems.com/

raheelajk wrote on Thursday, October 03, 2013:

Thanks Rod. Creating orders and results directory in home directory started uploading/downloading. I think it is secure also.

raheelajk wrote on Tuesday, October 08, 2013:

Rod,

I am having trouble figuring out what HL7 structure receive_hl7_results() in receive_hl7_results.inc.php is expecting. This script is pulling up results from results folder on remote server and my vendor (who will put results in results folder) wants to know what HL7 should look like.

Please help.

sunsetsystems wrote on Tuesday, October 08, 2013:

Hi Rahi, does your vendor not have a copy of the hl7 2.3 spec? I’ll need a more specific question before I can be helpful.

Rod
http://www.sunsetsystems.com/

raheelajk wrote on Tuesday, October 08, 2013:

My vendor needs ‘sample HL7 orders’ generated by openemr-4.1.2 and ‘sample HL7 results’ accepted by openemr-4.1.2. I have created a ‘sample HL7 orders’ file by creating a procedure under an encounter but how can I create ‘sample HL7 results’ file?

This will overall help him to process orders sent by openemr and then generate results processable by openemr.

am I making sense?

Thanks,

sunsetsystems wrote on Tuesday, October 08, 2013:

The sample results that I have were created by others and not mine to give. In any case I don’t think a few samples would be sufficient to document what’s needed, that’s what the spec is for.

OpenEMR support for this is likely to grow a lot, but if they’re doing software development then they should be able to look at receive_hl7_results.inc.php to get a very good understanding of the current state of what it’s expecting. I could write up some technical documentation in lieu of that if there’s a budget for it and you’re not in a big hurry, but in this case it doesn’t sound necessary.

Rod
http://www.sunsetsystems.com/