Change permissions in OS 10.2 server

Hi All,
I’ve tried the script posted by Rob (below) with no sucess. I’ve got a mix of OS9 and OSX clients writing postcript files to a watched folder (on a box running OS 10.2 server) for distilling into pdfs. The problem is that files from the OSX clients come in with Group permissions set to Read Only, while the OS9 client files come in as Read-Write (only the read-write will distill).

I need a way to easily set all the files to Read-Write or change all ownership to admin . This script looked perfect but doesn’t seem to work when I attach it to the folder. Anyone have any ideas?

Chuck

on adding folder items to this_folder after receiving these_items 
    repeat with this_item in these_items 
       tell application "Finder" to set group privileges of this_item to read write 
    end repeat 
 end adding folder items to

And this?

on adding folder items to this_folder after receiving these_items  
    repeat with this_item in these_items  
       do shell script "chmod 666 " & quoted form of POSIX path of this_item
    end repeat  
 end adding folder items to

You beat me to it JJ :wink:

chmod 766, might be better though as it leaves admin all priv’s.
→ rwxrw-rw-

chmod 666
→ -rw-rw-rw-

Depending on your nature you may prefer 666 to 766 :twisted:

( :lol: )

Hmmm, are those ears, or horns on that smiley?

Are you sure that folder actions are enabled? You can easily check with this:

tell application "System Events" to display dialog (folder actions enabled as text)

– Rob

Rob,

Results were “true”

Chuck

JJ,
this:

on adding folder items to this_folder after receiving these_items   
     repeat with this_item in these_items   
        do shell script "chmod 666 " & quoted form of POSIX path of this_item 
     end repeat   
  end adding folder items to

worked perfectly

Thanks to all,
Chuck

Hi All And thanks…
This is definately a Much needed script for our OS X SERVER 10.2.6
BUT** I have a strange problem…

The script:

on adding folder items to this_folder after receiving these_items    
      repeat with this_item in these_items    
         do shell script "chmod 666 " & quoted form of POSIX path of this_item  
      end repeat    
   end adding folder items to

Appeared to work at first, but I have noticed that it sometimes does’nt… Its an Intermittent!!!

Is this possible? That sometime it would work and others not??

Hmpf… Any ideas?
Thanks

P.S. I did confirm that folder actions were running fine…Thanks again

Jason Buecker