Skip to content

Commit c56529e

Browse files
author
wleroux
committed
Fixed permission issue with oradata
A recent change has introduced volumes to docker-oracle-xe-11g that broke the initialization of the oracle instance. This is due to a defect with the recursive copy of the original oradata: cp -r does not retain the original attributes of the files such as owner and group. When oracle initializes, it doesn't have permission to access the oradata. Instead of cp -r, cp -a does the same as cp -r but preserves the attributes. This effectively retains the permission settings of the original oradata.
1 parent 9341d2f commit c56529e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sh eol=lf

assets/startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Initialize the host's data volume, leaving a trace when finished.
44
if [ ! -e /u01/app/oracle/oradata/dataloaded ]
55
then
6-
cp -r /u01/app/oracle/oradata.orig/* /u01/app/oracle/oradata/
6+
cp -a /u01/app/oracle/oradata.orig/* /u01/app/oracle/oradata/
77
touch /u01/app/oracle/oradata/dataloaded
88
echo "Host data volume was initialized."
99
else

0 commit comments

Comments
 (0)