Environment
- Solaris 10
- TS 6.7.1 SP1
- using TS Groups
- using OS Users
so I have a workflow that I kick off and one of the tasks is an External Task that loops thru some DCR's and modifys the XML and rewrites them... 
here is an excerpt from the code just to give an idea.. this is working, no issues yet..
open(DCR, "$wfArea/$dcr_path") || die callbackDie("ERROR: Failed to open DCR $wfArea/$dcr_path to read ($!)");
 my $xml = do { local $/;  };
 close DCR;
 my $rootnode = TeamSite::XMLnode->new($xml);
 my $doc_node = $rootnode->get_node('related_documents');
 my $doc_internal_node = $rootnode->get_node('related_documents_internal');
 my $original_dcr = $rootnode->get_xml();
 $doc_node->set_inner_xml(''); #clear out current values
 $doc_internal_node->set_inner_xml(''); #clear out current values
 my $replacementNode   = $rootnode->get_node($docType); # fetch a new node reference
 $replacementNode->set_inner_xml($repStr); #set new values
 my $modified_dcr = $rootnode->get_xml();
 open(FILEWRITE, "> $wfArea/$dcr_path") ||  die callbackDie("ERROR: Failed to open DCR $wfArea/$dcr_path for write ($!) \n");
  print FILEWRITE $modified_dcr;
 close FILEWRITE;the WF External task that has this code in it, runs as a super-user, to make sure it can open/write to the file (and I dont think it will let me write back to the file otherwise).. the issue with that is, now the file says "modified-by" as that super-user (which I know why, but), ideally it would show the WF Owner..
I tried creating an additional External Task owned by iw_user, that once the first Task is done would be then just loop thru the files again and do a "touch" on the file(s).. but it wont let me.. when using TS groups, from the OS standpoint, all the files are owned by the OS group iwglobal rwxrwxr-x
since the users are not in that group from an OS standpoint, the script gets permission denied.. and again, I completely understand why.. 
does anyone have a though on how to let my admin task modify the file, but then get the modified-by set back to owner?
my "touch" code (which would work if not for permissions) was something like:
for (my $i = 0; $i < scalar @retouchFiles; $i++)
 {
  $logger->debug("\$retouchFiles[$i]: $retouchFiles[$i]");
  my $file = "$wfArea/$retouchFiles[$i]";
   if (-e "$file"){
    my $touchCMD = qq|touch "$file"|;
    $logger->debug("\$touchCMD: $touchCMD");
    qx($touchCMD);
   }
 }
 $task->CallBack(0,"successfully reset last-modified user to $taskOwner");
 exit 0;
I obviously dont want to open the DCRs to 777..
Any thoughts appreciated... I am sure there is another way to this.. I was even thinking instead of doing a "touch" to set a fake EA on the file, just to give it back to the user.. but I was trying to keep it clean..