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
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/
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
0
Comments
-
I suggest you look at TeamSite:irwalk or File::Find0
-
anisha,any reason for not using iwidmap CLT to change the user?
iwidmap only changes the User ID reference in the TeamSite internal tables. I need to change the file ownership down at the OS level.
- Bill0 -
--fishI suggest you look at TeamSite:irwalk or File::Find
Thanks. I looked at that pm. I'm still not clear on how to use it.0 -
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.0 -
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)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
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 ...)Thanks. I looked at that [TeamSite:irwalk and/or File::Find] pm. I'm still not clear on how to use it. 0 -
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 easy0 -
Please reply with the better explanation
0 -
You expect a response from a 9 year old thread? Really?
0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 144 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 119 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.