docker-images
docker-images copied to clipboard
OracleDNSServer fails with tee: /tmp/orod.log: Permission denied
Steps followed:
cd ~/OracleDatabase/RAC/OracleDNSServer/dockerfiles
./buildContainerImage.sh -v latest
docker run -d --name racdns \
--hostname rac-dns \
--dns-search="altitude-dashboard.com" \
--cap-add=SYS_ADMIN \
--network rac_pub1_nw \
--ip 172.16.1.25 \
--sysctl net.ipv6.conf.all.disable_ipv6=1 \
--env SETUP_DNS_CONFIG_FILES="setup_true" \
--env DOMAIN_NAME="altitude-dashboard.com" \
--env RAC_NODE_NAME_PREFIX="racnode" \
--privileged=true oracle/rac-dnsserver:latest
docker logs -f racdns
is generating:
docker logs -f racdns
04-18-2022 19:19:15 UTC : : Creating /tmp/orod.log
tee: /tmp/orod.log: Permission denied
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : HOSTNAME is set to rac-dns
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : RAC_PUBLIC_SUBNET is set to 172.16.1
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : HOSTNAME_IP_LAST_DIGITS is set to 25
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : RAC_DNS_SERVER_IP is set to 172.16.1.25
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : RAC_PUBLIC_REVERSE_IP set to 1.16.172
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : Creating Directories
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : Copying files to destination dir
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : Setting up Zone file
04-18-2022 19:19:15 UTC : : Setting up reverse Zone file
tee: /tmp/orod.log: Permission denied
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : Setting ip named configuration file
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : Setting up Resolve.conf file
04-18-2022 19:19:15 UTC : : Starting DNS Server
tee: /tmp/orod.log: Permission denied
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : Checking DNS Server
Server: 172.16.1.25
Address: 172.16.1.25#53
Name: rac-dns.altitude-dashboard.com
Address: 172.16.1.25
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : DNS Server started sucessfully
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : ################################################
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : DNS Server IS READY TO USE!
tee: /tmp/orod.log: Permission denied
04-18-2022 19:19:15 UTC : : ################################################
04-18-2022 19:19:15 UTC : : DNS Server startup failed!
I don't know where to add chmod 777 /tmp
Solved also by adding chmod 777:
RUN chmod 755 $INSTALL_DIR/install/*.sh && \
$INSTALL_DIR/install/$SETUP_LINUX_FILE && \
$INSTALL_DIR/install/$SUDO_SETUP_FILE && \
sync && \
rm -rf $INSTALL_DIR/install && \
chmod 755 $SCRIPT_DIR/*.sh && \
chmod 666 $SCRIPT_DIR/$ZONEFILE && \
chmod 666 $SCRIPT_DIR/$REVERSE_ZONE_FILE && \
chmod 666 $SCRIPT_DIR/$NAMED_SAMPLE_FILE && \
echo "nohup $SCRIPT_DIR/runOracle.sh &" >> /etc/rc.local && \
chmod +x /etc/rc.d/rc.local && \
useradd orcladmin && \
chmod 777 /tmp && \
sync
Adding chmod on any other position than before sync does not have any effect for some reason. This might be a Docker issue actually.
If changing the mode is needed, then don't use 777 on /tmp. Use 1777 instead.
Thanks for the advice. What's the difference?
It doesn't work when using 1777, it works when it's 777
Sure, thanks. Let me cross check this.
This is now fixed, i dont see this issue now, can we close this issue?
docker run -d --name racdns \
--hostname rac-dns
--dns-search="altitude-dashboard.com"
--cap-add=SYS_ADMIN
--network rac_pub1_nw
--ip 172.16.1.25
--sysctl net.ipv6.conf.all.disable_ipv6=1
--env SETUP_DNS_CONFIG_FILES="setup_true"
--env DOMAIN_NAME="altitude-dashboard.com"
--env RAC_NODE_NAME_PREFIX="racnode"
--privileged=true oracle/rac-dnsserver:latest -f racdns87e811df6d28137d226d1cc91d3e48250cc24e53bd3f122a12951370805eb4c5 [root@instance-20220824-1501 dockerfiles]# docker logs -f racdns 12-15-2023 12:06:58 UTC : : Creating /tmp/orod.log 12-15-2023 12:06:58 UTC : : HOSTNAME is set to rac-dns 12-15-2023 12:06:58 UTC : : RAC_PUBLIC_SUBNET is set to 172.16.1 12-15-2023 12:06:58 UTC : : HOSTNAME_IP_LAST_DIGITS is set to 25 12-15-2023 12:06:58 UTC : : RAC_DNS_SERVER_IP is set to 172.16.1.25 12-15-2023 12:06:58 UTC : : RAC_PUBLIC_REVERSE_IP set to 1.16.172 12-15-2023 12:06:58 UTC : : Creating Directories 12-15-2023 12:06:58 UTC : : Copying files to destination dir 12-15-2023 12:06:58 UTC : : Setting up Zone file 12-15-2023 12:06:58 UTC : : Setting up reverse Zone file 12-15-2023 12:06:58 UTC : : Setting ip named configuration file 12-15-2023 12:06:58 UTC : : Setting up Resolve.conf file 12-15-2023 12:06:58 UTC : : Starting DNS Server 12-15-2023 12:06:58 UTC : : Checking DNS Server Server: 172.16.1.25 Address: 172.16.1.25#53
Name: rac-dns.altitude-dashboard.com Address: 172.16.1.25
12-15-2023 12:06:58 UTC : : DNS Server started sucessfully
12-15-2023 12:06:58 UTC : : ################################################
12-15-2023 12:06:58 UTC : : DNS Server IS READY TO USE!
12-15-2023 12:06:58 UTC : : ################################################
12-15-2023 12:06:58 UTC : : DNS Server Started Successfully
12-15-2023 12:06:58 UTC : : Setting up reverse Zone file
12-15-2023 12:06:58 UTC : : Setting ip named configuration file
12-15-2023 12:06:58 UTC : : Setting up Resolve.conf file
12-15-2023 12:06:58 UTC : : Starting DNS Server
12-15-2023 12:06:58 UTC : : Checking DNS Server
12-15-2023 12:06:58 UTC : : DNS Server started sucessfully
12-15-2023 12:06:58 UTC : : ################################################
12-15-2023 12:06:58 UTC : : DNS Server IS READY TO USE!
12-15-2023 12:06:58 UTC : : ################################################
12-15-2023 12:06:58 UTC : : DNS Server Started Successfully
No more reproducible.