April 26, 200718 yr I am exporting data to a csv file. After the export, permissions of the csv file for "Group" and "Others" revert to "Read only". They need to stay "Read and Write" for everything. I'm running FileMaker Pro 8.5 in OS 10.3.9. Hope someone can help me.
April 29, 200718 yr I think this is just the way OS X defaults (for any new documents). You may be able to build an AppleScript (or Automator action in 10.4) to change permissions of the file after it is created.
April 29, 200718 yr Just a guess here, but are the other using Windows Machine. There is a noted problem which has been discussed many times in the past that when you pass off a file to Windows, its operation system changes the permissions of Read Write to Read only. HTH Lee
April 30, 200718 yr Author Lee The csv file resides on a Mac. Data is written into it across the LAN by Windows machines. Then filemaker (on the Mac) reads data out of it, then writes just the header record (from a table that contains just the header record) back to the csv file. That 's when the permissions get changed. Ender So it's not actually being "created" every time (unless overwriting is the same thing). Hope I won't have to go the "applescript" route ... of course, that would just be something else I could learn. +) Thanks a lot for your help, guys
May 10, 200718 yr Author It's a bug in FileMaker. I got an applescript for resetting the permissions that will work manually but will not work in the FileMaker script. (Tier 3 tech support at FileMaker says it's a bug in FileMaker.) -explanation- When exporting to the .csv file via a script, a temp file is created, and somehow, for some reason the original file and the temp file both exist until some certain other actions happen. -- I can't explain this, but if I write a script that just exports to the .csv file, I cannot change its permissions with the applescript manually either, until I go to view that directory in the finder (and see the temp file in the directory for some small part of a second before it dissapears). Then it works fine, i.e., the applescript can change the permissions. -workaround- So what I've found to work so far, though not pretty, is to include in the applescript a command to open the .csv file before resetting its permissions. I guess this causes the temp file to be processed which then allows access to set permissions. Export Records [No dialog;"file.csv"] Perform AppleScipt ["tell application "Finder" open alias "path:path:file.csv" set group privileges of alias "path:path:file.csv" to read write set everyones privileges of alias "path:path:file.csv" to read write end tell I figure there must be a way to close the file in applescript but, being totally new to applescript, I haven't found it yet. Ender and Lee, thanks again for your contributions.
Create an account or sign in to comment