Required a FOLDER ACTIONS script for a CHMOD 777 for Files R/W

Dear Cleverer Folk than I,

I’m sure this MUST be possible in 2016! All the information on the web dated 2008, 2009 vintage out there with NO success. I hunt and find disappointment. Am I the only person who requires this to happen?

  1. Put anyone’s files into a shared Folder (easy bit, everyone can see it on the network and can save to it - that’s easy).

  2. Activate “FOLDER ACTIONS” to run a script to change ALL the enclosed files/folders to “READ/WRITE” by ALL Users. I can’t find any information for this on the scripting side. I’ve found how to attach a script to FOLDER ACTIONS but NOT the correct coding for the script itself.

  3. Every so many minutes or on “a new file added”, it runs automatically (basically a CHMOD 777 command recursively, without user interaction required).

I have extremely limited Terminal experience and items like to writing my own shell scripts. All the “helpful” websites are very old and expect a great deal of knowledge BEFORE you get to read their web page. I need just a turnkey script which I just have to put in “Which FOLDER” for the action to take place, and save any user/password (if required) so the script can occur automagically.

Then no one has to manually change permissions of a shared folder when you hear “I have to do a “SAVE AS” - I can’t change the text of your Word document”.

I’ve been told by a programmer, “Yeah, it’s all possible - but I won’t tell you”. He understands the reasoning - so have others but never been shown a WORKING example. Lots of “bits” but I’ve never had any success with the pieces shown.

Regards

Q

Model: iMac
AppleScript: 2.81
Browser: Firefox 45.0
Operating System: Mac OS X (10.10)

Here are two scripts.

The first one change attributes of the files dropped onto the folder to which it is attached.
Don’t worry upon the first (disabled) instruction, it’s the one which I use to test the code.

--my germaine((path to desktop as text) & "shared:" as alias, {(path to desktop as text) & "Shared:" & "Ali Harb - «‰L'islam ne peut pas être réformé.‰».rtf" as alias, (path to desktop as text) & "Shared:" & "CatalPrintemps2016v2(1).pdf" as alias, (path to desktop as text) & "Shared:" & "double-planche-finale-du-sceptre-d-ottokar-par-herge-1939-estimation-700-000-euros_5574473.png" as alias, (path to desktop as text) & "Shared:" & "Reiser-Le+Corbusier+1973.jpg" as alias})


on adding folder items to this_folder after receiving these_items
	my germaine(this_folder, these_items)
	
end adding folder items to

on germaine(this_folder, the_items)
	repeat with anItem in the_items
		do shell script "chmod 777 " & quoted form of POSIX path of anItem
	end repeat
end germaine

The second one uses the -R option available for chmod so it apply the attributes to the folder and to every items embedded.

on adding folder items to this_folder after receiving added_items
	
	do shell script "chmod -R 777 " & quoted form of POSIX path of this_folder
	
end adding folder items to

Yvan KOENIG running El Capitan 10.11.4 in French (VALLAURIS, France) lundi 25 avril 2016 11:07:15