Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
iw_gen not writing extended attributes
Lex
I'm having a very strange problem with iw_gen not writing extended attributes when called from a Perl script. If I call iw_gen from a command line everything works as expected. However, when I call it within a Perl script (which is called from a workflow), here are the results:
1) If the file being generated does not pre-exist the file is generated fine, but no extended attributes are written.
2) If the file being generated pre-exists *without* extended attributes (as a result of 1 above) the file is generated fine, but no extended attributes are written.
3) If the file being generated pre-exists *with* extended attributes (as a result of either manually generating from the templating UI or from the command line) the file is generated fine and extended attributes are written.
Here is how it's being called in the Perl code:
my $success = system("$iw_gen -t $template -r $datarecord $weeklyfact_file");
I wanted to make sure the command was being properly formed (which I was certain it was since the file *is* actually generated) so I added this:
open(LOGGING_FILE, ">d:\\testlog.log");
print LOGGING_FILE "$iw_gen -t $template -r $datarecord $weeklyfact_file";
close(LOGGING_FILE);
After the Perl script is called from the workflow, the log file contains:
d:\iw-home\bin\iwgen -t /default/main/WY/WORKAREA/wy_dev/templatedata/wyaboutus/wywklyforest/presentation/wyforestfact.tpl -r /default/main/WY/WORKAREA/wy_dev/templatedata/wyaboutus/wywklyforest/data/weeklyfact /default/main/WY/WORKAREA/wy_dev/weeklyfact/weeklyfact.asp
I can't figure out why this doesn't work in Perl, but works fine on the command line. I can cut and paste the above in a command window and the file will be generated *with* the proper extended attributes. There's got to be something basic I'm missing, but I don't know what. Any ideas?
Thanks,
Darryl
Find more posts tagged with
Comments
Adam Stoller
What version of TeamSite / TeamSite Templating are you using (including SP and patches)?
What platform are you running on? (WNT or W2K or ?)
Have you tried using back-ticks (``) instead of system() ? -- more out of curiosity to see if it works one way as opposed to the other, but it seems like it should work in either case.
--fish
(Interwoven Senior Technical Consultant)
james1
If I had to guess, I'd say that because you appear to be on Windows, your workflow external task is running as SYSTEM instead of as the owner of the external task, and it would appear that the SYSTEM does not have permissions to set EA's on the file ... ? Just a guess.
In general, you should not assume that if it works on the command line, it will work as a workflow external task. Its runtime environment WILL be different.
-- James
--
James H Koh
Interwoven Engineering
pawlr
you might also try it as a filehandle pipe..
Lex
Ah, sorry for not providing those details. TeamSite 5.5.2 SP2, Templating 5.5.2 SP2. Win2K Server.
I tried backticks and, as you suspected, the same results occurred.
Lex
You are correct, we're using Win2K and the owner of the generated file is listed as SYSTEM. So there's a possiblity that SYSTEM can create the file and then not have permissions to write out extended attributes? Weird.
I traced this back to see when the problem started (since I know we never had a problem editing a DCR on a generated file from the generated file before) and found that extended attributes abruptly stopped being written on 1/22. We have racked our brains trying to think of anything that might have changed on that day, but if something changed I have no idea what. On or about 1/7 SP2 was installed, but that's the only known change. How can I check to see that SYSTEM has the appropriate authority to write extended attributes?
Thanks!
james1
You probably need 5.5.2 SP2b and its associated patches. See:
https://support.interwoven.com/kb/kb_show_article2.asp?ArticleID=49745
It sounds like you're seeing bug 36984, referenced at the very end of that KB article.
-- James
--
James H Koh
Interwoven Engineering
Lex
We'll give that a shot and see if it corrects the problem. Thanks!
Lex
Thanks, James! SP2b did the trick and extended attributes are now being written out again.
-Darryl Luther