OS X Snow Leopard, change file permissions on copy

I work with OS X, Snow Leopard and need to allow users to make copies of files (templates) located in a read-only repository for subsequent editing.

The repository is located on a separate physical drive mounted to the OS X boot volume.

As this is a shared computer in a school environment, all users access the machine via a single login (“user_local”).

Whether using POSIX permissions or ACLs, the use case requires the file permissions to change from “read” to “read write” as they get copied to the “user_local” home directory.

Googling around has not yielded anything that would indicate that this is possible via the Snow Leopard permission system.

Question 1:
Is this in fact possible via the permission system?
If so, how?

Question 2:
If not possible, how would one go about solving this problem?
I imagine this to be a fairly common use case so there must be a workable solution for it out there.

Thanks.

Answer

What I would probably do if presented this is to write a little bash script. You can use the cp command to copy the file. cp link The chmod command will allow you to change the permissions. chmod link You should be able to set up a cron job to run every night or whenever you needed. Make sure when running the script you have fallen into sudo -s or sudo in front of every command. There is a way to lock the file on ubuntu so you aren’t required to enter sudo or sudo -s but I can’t think about it off the top of my head.

Attribution
Source : Link , Question Author : Francesco K , Answer Author : atrueresistance

Leave a Comment