Setting priveliges for a Folder AND it's associated sub folders/files

I keep hitting a brick wall and need “easy to understand and implement” help here. Friends say “Oh, it’s easy” and never explain how. Others “Oh that’s dangerous, I won’t tell you”.

So easy steps please would be great. I’m NOT a scripter by trade and by “presuming you know all about scripting” in the instructions I have read from others doesn’t help me - I’m left wondering “what am I missing?”.

SCENARIO - /Users/Shared Folder/Shared Work Folder - this has items added by “any number of workers”. They may setup a new folder and create or copy in documents (like Microsoft Word) from any “outside users”.

Naturally the ownership of these files and folders are all over the place but ANY worker may need to access these files to add or change the contents.

We don’t need a file server - never needed one for a simple task but find more and more files aren’t being “owned” by the group and manually “GET INFO” and changing the master “Shared Work Folder” is easy but difficult if the person who’s job this is - isn’t in the office.

Could it be possible to get it to “every few hours” check? Failing that something that can be “double clicked” and will just do this ONE folder/subfolder with files to “share everything, allow read/write everything”. I can then make that script “run at timed intervals” with iCal.

I’ve had a hunt for any Applications that might “self do this at timed interval” but as it happens the programmes I have found have a big note - “We are no longer supporting this product to focus on other new software opportunities”. Great.

do shell script "chmod -R 777  /home/admin/domains/domain_name/public_html/folder/ " with administrator privileges

chmod=change permissions, -R means recursive- to change the content of that folder permissions aswell, then path to what you’re trying to change.
With admin privileges is just to make sure you yourself can change the permissions to anything. If you were in terminal, you’d have to do sudo then the code to give you that access if you don’t personally own that folder.

google up on chmod to make sure you get the right numbers for your task.

Thanks for the help so far.

If I can get it to insert the password into the dialogue box asking “AppleScript Editor wants to make changes. Type your password to allow this.”.

I have tried copy/pasting - which does not work

I have tried “drag copy text” - which does not work.

Is there any automatic ways to type in the text (I can get it to click OK but not insert the text). If I can get an answer to this, I have another Application I wish to script to get it to QUIT without having to type in the Admin password too.



So you’re asking if the password can be put in automatically? Try this: It doesn’t work on my OS anymore but maybe it will for yours. (i’m using Mavericks)

do shell script "chmod -R 777 /home/admin/domains/domain_name/public_html/folder/ " with administrator privileges -- administrator privileges is only needed to folders you don't own. delete the with administrator privileges if you don't need it. 
delay 1
tell application "System Events" to keystroke "password goes here" 


I think 'do shell script always needed the password:

and not just the administrator privileges