Unable to load documents into OpenEMR

nursejeff wrote on Tuesday, September 15, 2015:

When we are trying to upload a pdf file into documents we are getting the following error:

“Unable to create patient document subdirectory”

Please help.

Jeff Guillory
Lumberton, TX

visolveemr wrote on Wednesday, September 16, 2015:

Hello Jeff

This is due to the pemission problem to the folder ‘sites/default/documents’. Make sure this folder is writtable, to create subdirectories for the patient documents.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

nursejeff wrote on Wednesday, September 16, 2015:

Thank you ViSolve,

Why would the permission change?

visolveemr wrote on Wednesday, September 16, 2015:

Jeff

This could have happened while copying the openemr(installed) folder to another location and use it from there(without reinstalling it). While copying the directory the permissions would have been changed.
To avoid these kind of issues when copying, recommend to use --preserve attribute in ‘cp’ as follows.

                cp -rp <source_path> <destination_path>

This will preserve the mode and ownership of the source directory.

Thanks
OpenEMR Customization/Support Team,
ViSolve Inc
services@visolve.com | Phone: 408-850-2243
Demo’s @ ViSolve Demo Library

nursejeff wrote on Wednesday, September 16, 2015:

I understand ViSolve, but I didn’t do anything. We were practicing as normal, and I did nothing to my server and suddenly it stopped accepting the documents.

Weird things are happening lately (backup stopped working). Scares me a bit.

Jeff

nursejeff wrote on Wednesday, September 16, 2015:

OK. The problem is fixed.

I went into the /var/www/html folder via the terminal.

I used the command: sudo chmod -R 777 ./

Now I can once again upload files into OpenEMR.

Thank you mi-squared.

I am too linux ignorant. I don’t even know what the above command means, but I have good people helping me.

I still don’t know why I would suddenly had this issue. It is curious why my permissions decided to change.

Jeff

I had this issue too and fixed it with sudo chmod -R 777 ./ This issue happened after we upgraded from version 6 to 7.