Linux file/folder permissions could be very confusing for a beginner, minimum for me! After these many years of interacting with Linux I still get confused deciding what rights should be given to users or groups on certain folders :)
I came across a situation where the application tier cloning was continuously failing with the title error
RC-50004, AC-00005: No write permissions for creating the Context file – /tmp/temp.xml ?
I checked the for the /tmp folder permissions and realized the application user (applmgr/appltest) had proper right permissions on /tmp folder, yet the adcfgclone will not proceed after
Do you want to preserve the Display [erp-prod:0.0] (y/n) ? : n Target System Display [erp-prodbak:0.0] : RC-50004: Error occurred in CloneContext: AC-00005: No write permissions for creating the Context file - /tmp/temp.xml Raised by oracle.apps.ad.context.AppsContext Check Clone Context logfile /u01/applprod/PROD/apps/apps_st/comn/clone/bin/CloneContext_1208121418.log for details.
After few attempts I came against another blog, that was explaining the situation in a different way. http://newgendba.blogspot.com/2009/08/how-to-quick-solve-this-post-clone.html
Blogger has suggested to check whether temp.xml created by another user exist in the /tmp folder, which was the actual reason in my case. I found temp.xml file created by “root” and deleted the same and cloning process just went all the way fine.
Hope this info helps few of those once in a bluemoon DBAs out there :)