Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Verdant is offline Member
    Join Date
    Jan 2010
    Posts
    45

    Default

    You can also set up an Automator action to run a shell script on your shared folder. Create an Automator workflow on the folder and then go to Utilities>Run Shell Script and copy/paste the following (remove cat if it appears by default):

    Code:
    #!/bin/sh
    
    /bin/chmod -R 777 "/Users/username/Desktop/Share"
    /bin/echo Done
    Obviously replace my path with the path of your folder, which can easily be found by opening a terminal window and just dropping the folder into the window.

  2. #12
    Shawn is offline Senior Member
    Join Date
    Aug 2007
    Location
    Topsham, Maine
    Posts
    189

    Default

    You could also do this automatically with a folder action. Copy this text into script editor
    -----
    on adding folder items to this_folder after receiving added_items
    tell application "Finder"
    set fold_name to the name of this_folder
    try
    repeat with i from 1 to number of items in added_items
    set new_item to item i of added_items
    set the item_path to the quoted form of the POSIX path of new_item
    do shell script ("/bin/chmod -R ug=rwx " & item_path)
    do shell script ("/bin/chgrp -R [groupname] " & item_path)

    end repeat
    end try
    end tell
    end adding folder items to
    ----------------
    change the variable [groupname] to whatever group you want to give access to (ie: admin, client, CSR, etc).

    Now save the script (User/Library/Scripts/Folder Actions is a good place). Right click (or Control click) on the folder and enable folder actions then right or control click again and choose "Attach a Folder action" pick the script you just saved.

    Now anything dropped into the folder will automatically get it's permissions changed to read/write/execute for the owner and group of the file and the group will be set to whatever groupname you entered.

    You can also do this with a bitmask as Verdant mentioned change the first do shell script to ("/bin/chmod -R 777 " & item_path) although this will open ALL access to that folder which may not be what you want.

    This site has some more info on setting Unix file permissions
    Modify User Permissions - Webmonkey

    Shawn

  3. #13
    Slartybartfast is offline Junior Member
    Join Date
    Aug 2007
    Posts
    12

    Default

    Sorry for so long in getting back but again thank you to all for your help.
    As this is a live server I'll try the various options that have been suggested at the weekend.

    I'll let you know !

    Cheers
    Neil

  4. #14
    Slartybartfast is offline Junior Member
    Join Date
    Aug 2007
    Posts
    12

    Default

    Hi all,
    I went for the Sandbox option as I'm not too comfortable with terminal, it took a while to get my head round at what level to apply the permissions but I ended up applying them to the user and all the folders within.
    Worked like a charm so thanks to all of you for your help !

    Cheers
    Neil


Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Sponsors