You should be able to prevent deletion of records or field data from the security options. You can define a general user priveledge set that prevents the user from deleting.
Thanks Mark...we agree with you...but can't make it work in practice.
We are not experts on NTFS but to expand a bit further on how it is or rather isn't working for us:
The pdf's are created and saved in a specific folder on the network drive and it would appear that Filemaker uses the permisions that the USER has in order to do that. The same permisions are used to view the folder list/files. If we restrict the users permisions to just "read, list & execute" with security settings that will stop the delete problem, but also prevents the user from creating a new pdf in the first place. What we can't get our head round is how to seperate out the two requirements for the same user?
Is there a way we can get Filemaker to use one set of permisions to create the pdf and another to view it?
Hope that makes sense and thanks in advance for any further help.
It sounds like the issue is to prevent a user from deleting the pdf from the server, not necessarily deleting the record from the database. That would be more difficult unless there there is a way to use applescript or something similar to change the file properties to read only (an idea I will want to look into now that you have me thinking). It may also work to have the file copied into a hidden folder that the user will have difficulty finding, so that the only easy way to get to the file is through Filemaker where you can lock the record to prevent modification. Though they would still be able to open the file, modify it and save it or track down the path if they really wanted to. Or you could have Filemaker duplicate the pdf to a different folder, then periodically check the two pdfs against each other to see if the one has been deleted or modified.
Thanks Mark...that's exactly right...my partner and I have just been going through the same thought processes as you...and coming up with the same answers too! We hadn't thought of applescript though, so if you have any further thoughts on that one certainly would be very gratefull to hear them.
I'm not very well versed in applescript. I've used one that creates or opens folders on the server to set up different jobs, but I found that in here and copy/pasted it into my file and only had to make minor modifications, I still don't understand exactly how it works but it does.
I would assume that you can script finder to set permissions on a file and if so, you should be able to run that script through Filemaker. You would have to find a way to pass the file name and path through variables to the applescript so that you get the right file.
Ok...many thanks for your help
It should be something like
do shell script "chmod 444 /path/to/file"
The 444 makes it read only to owner, group and everyone else. You could make it 744 so that the owner (server) does have RW permissions.
I would have to try it, but maybe you could do something like
set Var $filepath = GetFilePath(pdf container)
do shell script "chmod 744 $filepath"
Thanks again Mark...unfortunately as I said at the beginning we work in a Windows enviroment so Applescript is not an option but I guess something like VBScript would be but because we have no knowledge of it we have decided to pull it all back inside Filemaker. Quite simple really once we got away from the idea of using the "Web Veiwer" to give a list of the pdf files...we used a portal within Filemaker to list the pdf's and the "OpenURL" command to open the specific file directly in Acrobat...no easy way of deleting it like that!
Manty thanks again