File permissions created by Save Records as PDF

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

File permissions created by Save Records as PDF

Gary Reimer-2
Hello experts;

I have a script (FileMaker 13 on a Mac OS 10.11.6) that creates goes through two steps of Save records as PDF (1st step creates the file and 2nd step appends). A following step executes an AppleScript that opens the file in Preview ready to be printed. On one computer, the file is created with permissions user-Read & Write and everyone-Read only. However on the second computer, the file is created with permissions user-Read & Write and everyone-no access.  The appleScript appears to not run under the users OS user id because on the second computer the appleScript fails to open the file in Preview and a message appears saying it failed because the script does not have permission.
Two questions:
1. Why would the same script running on two computers create files with different permissions.?
2. Why does the appleScript not run as the user?

Thanks in advance for any help,
Gary

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: File permissions created by Save Records as PDF

Egon
To answer #1 where is the file being saved to and what are the permissions on the directory? Files created into a directory inherit the permissions of that directory. So start there and check to see if the second user has the correct permissions set up.

This would likely correct the 2nd problem as well.

J. Hall
[hidden email]
713-409-0554

> On May 24, 2017, at 2:38 PM, Gary Reimer <[hidden email]> wrote:
>
> Hello experts;
>
> I have a script (FileMaker 13 on a Mac OS 10.11.6) that creates goes through two steps of Save records as PDF (1st step creates the file and 2nd step appends). A following step executes an AppleScript that opens the file in Preview ready to be printed. On one computer, the file is created with permissions user-Read & Write and everyone-Read only. However on the second computer, the file is created with permissions user-Read & Write and everyone-no access.  The appleScript appears to not run under the users OS user id because on the second computer the appleScript fails to open the file in Preview and a message appears saying it failed because the script does not have permission.
> Two questions:
> 1. Why would the same script running on two computers create files with different permissions.?
> 2. Why does the appleScript not run as the user?
>
> Thanks in advance for any help,
> Gary
>
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|

Re: File permissions created by Save Records as PDF

Gary Reimer-2
Jerry, thanks for the very prompt reply. I did check permissions on the destination directory and they were how I would have wanted, but not what the created pdf file had. However, with further tests, the behaviour changed and the pdf started having the correct permissions. But on this one computer the applescript would still fail to open the file.

Then I went for a simpler approach and created an appleScript that told Finder to open the file and not specify an app. So now it works and the default app for pdf's opens. So problem solved.

Thanks
Gary

> On May 24, 2017, at 2:42 PM, Jerry Hall <[hidden email]> wrote:
>
> To answer #1 where is the file being saved to and what are the permissions on the directory? Files created into a directory inherit the permissions of that directory. So start there and check to see if the second user has the correct permissions set up.
>
> This would likely correct the 2nd problem as well.
>
> J. Hall
> [hidden email]
> 713-409-0554
>
>> On May 24, 2017, at 2:38 PM, Gary Reimer <[hidden email]> wrote:
>>
>> Hello experts;
>>
>> I have a script (FileMaker 13 on a Mac OS 10.11.6) that creates goes through two steps of Save records as PDF (1st step creates the file and 2nd step appends). A following step executes an AppleScript that opens the file in Preview ready to be printed. On one computer, the file is created with permissions user-Read & Write and everyone-Read only. However on the second computer, the file is created with permissions user-Read & Write and everyone-no access.  The appleScript appears to not run under the users OS user id because on the second computer the appleScript fails to open the file in Preview and a message appears saying it failed because the script does not have permission.
>> Two questions:
>> 1. Why would the same script running on two computers create files with different permissions.?
>> 2. Why does the appleScript not run as the user?
>>
>> Thanks in advance for any help,
>> Gary
>>
>> _______________________________________________
>> FMPexperts mailing list
>> [hidden email]
>> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
> _______________________________________________
> FMPexperts mailing list
> [hidden email]
> http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au