[FX.php List] Permissions and such
Jonathan Schwartz
jonathan at exit445.com
Fri Feb 5 13:45:52 MST 2016
Hi Folks.
I have a nagging, unresolved problem with file permissions when using FileMaker API that I need to solve. I’ve been doing work-arounds for…well…2 years. It’s time to get it fixed. The OS is OS X.
The problem is with php creating new files, specifically PDF files using pdf.php and fpdi.php, which upon creation are owned by the Apache web server user (“_www" in some cases, “fmserver” in others). Upon creation, the permissions are such that a subsequent operation can not be performed (merging multiple PDFs, for example) because php doesn’t have permission to modify the files. (Permissions are ReadWrite/ReadOnly/ReadOnly). My work around has been to break up the steps and manually changes permissions before proceeding.
There is more detail available, but the big picture is getting permissions under control to avoid these issues.
I’ve tried issuing CHMOD and CHOWN commands in the php script, without success. The commands fail because php doesn’t have authority.
I’ve also reviewed other approaches such as “mask", but I can’t quite figure it out.
I’ve also tried to understand how to make a group that includes all the “users” involved, but have been unable to grasp the concept.
I also understand that the is a technique to have the new files adopt the permissions of the enclosing folder, but I haven’t figure out that one yet either.
I’ve got the problem in FMS 11 and 12 and I know that FMS13+ makes the problem worse.
How do I do this!?
Jonathan
Jonathan Schwartz
jonathan at exit445.com
More information about the FX.php_List
mailing list