unzip and +w permission issues
Dear Experts,
I'm trying to unzip one of Oracle's EBusiness suite files.
I kept getting issues like:
unzip B24483-01.zip
...
checkdir error: cannot create doc/upgrade.1012
unable to process doc/upgrade.1012/upgrade/toc.htm.
checkdir error: cannot create doc/upgrade.1012
unable to process doc/upgrade.1012/upgrade/trouble_upgrade.htm.
This directory had been previously unzipped.
It turned out that the parent directory didn't have write permissions.
ls -l /appsinstall/StageR12
...
dr-xr-xr-x 3 oracleapps dba 4096 Aug 13 2008 doc
So during unzip, the directory was created, but nothing could be
written to the directory!
I changed the permissions, and a subsequent unzip worked.
chmod +w ` find . -type d |cut -d / -f2 | uniq `
But if that wasn't enough, there were new directories
inside the zip file. And they too, were zipped up
without the correct (+w) permissions!
This became an iterative process to fix.
Try to unzip.
Observe writing to the directories fail.
Change the permissions on these new directories.
Repeat, selecting N for overwrite None.
Lots of wasted time.
I don't want to do the unzipping as root.
Is there a flag to use with unzip to deal with this issue?
Force directories to be created, but not overwrite anything?
Or, change the permissions on the directories to +w as they are created?
Thanks a lot!