Perl Script Needed: Trying to Change OS User in Content Store

Hi.

I'm still learning Perl scripting & TeamSite modules.

I need a script that will read through an entire Content Store, via a vpath, to find any file owned by specific user IDs (available from a flat text file, one user ID per line) and change ownership of that file to a specific user ID (tsmaster in this case).

I know I can write a shell script but I need a script or process that runs quickly.

I was trying to modify the InterWoven "walkArchive.pl" script but am failing miserably.
a) it reads through the content store directly (/etc/defaultiwstore/) and I need to read through the vpath (/iwmnt/)
b) I'm not sure how to lookup the specific user ID in the flat file

Any help is greatly appreciated. If there's a different/better way to so this, I'm open to that suggestion as well.

Thanks!
Bill

Comments

  • any reason for not using iwidmap CLT to change the user?
  • I suggest you look at TeamSite:Smiley Very Happyirwalk or File::Find
  • any reason for not using iwidmap CLT to change the user?
    anisha,

    iwidmap only changes the User ID reference in the TeamSite internal tables. I need to change the file ownership down at the OS level.

    - Bill
  • I suggest you look at TeamSite:Smiley Very Happyirwalk or File::Find
    --fish

    Thanks. I looked at that pm. I'm still not clear on how to use it.
  • Our usual approach when we have massive ownership or permission changes is update submit.cfg, "touch" all of the files in a workarea, and submit the workarea. I think you'll find that faster, both to develop and to execute.

    The con is that it has to be ok to submit everything. If you have work in process content, you may want to omit it. In those scenarios, we typically check the locks and skip any locked files, then count on them to get corrected when they are submitted through the workflow.
  • anisha,

    iwidmap only changes the User ID reference in the TeamSite internal tables. I need to change the file ownership down at the OS level.

    - Bill
    I'm not positive about this - but I believe that if you change the idmap within TeamSite and access the file through the TeamSite virtual filesystem, that the ownership will appear to have changed at the OS level (you should be able to test this out fairly easily)
    Thanks. I looked at that [TeamSite:Smiley Very Happyirwalk and/or File::Find] pm. I'm still not clear on how to use it.
    Well do a little experimentation - it's not that difficult. If you cannot figure it out that way, you should look to hire someone else to come in and do it for you (for some reason I doubt you need to go that route, but ...)
  • If you search File::Find in the perl forum, you will find posts like this

    http://devnet.interwoven.com/forums_vb/showthread.php?t=29320&forumid=50

    Figure that out, then changing owner should be easy
  • Please reply with the better explanation

  • You expect a response from a 9 year old thread? Really?

Sign In or Register to comment.