gvenzl / oci-oracle-xe

Build scripts for Oracle Database XE container/docker images
Apache License 2.0
275 stars 74 forks source link

File Permissions and Copying files #96

Closed aminadatia closed 2 years ago

aminadatia commented 2 years ago

Hi

How do I change files permission and Owner for files copied into the 21cFull container. I am trying to install Oracle Kafka from SQLDeveloper. There are files orakafka.properties for example, which when I copy from Ubuntu to 21cFull:, the owner:group become 1000:1000. I can then not change the ownership or the permission.

gvenzl commented 2 years ago

Hi @aminadatia,

Could you please elaborate on how you copy these files into the container?

aminadatia commented 2 years ago

Hi

I downloaded SQL Developer and installed on my Windows for Linux. Extracted the Kafka zip file. Installed to XE database. Realized it had to be run from within the Docker Container 21cFull. I then did cp file-from-wsl to file to 21cFull container location. The file copies but owner is 1000:1000 . I tried to do chown to oracle:oinstall but I get permission denied. I can go to /opt/oracle and all the directories and files are owned by oracle.

Regards

Regards Amin Adatia


From: Gerald Venzl @.> Sent: Saturday, March 26, 2022 9:57:41 PM To: gvenzl/oci-oracle-xe @.> Cc: Amin Adatia @.>; Mention @.> Subject: Re: [gvenzl/oci-oracle-xe] File Permissions and Copying files (Issue #96)

Hi @aminadatiahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faminadatia&data=04%7C01%7C%7C43477342f7c744bbb94608da0f952dea%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637839430642701931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4QdraikjsHzgMv6Br9bakSA1vxe8q%2BDJWtXihmqIED4%3D&reserved=0,

Could you please elaborate on how you copy these files into the container?

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgvenzl%2Foci-oracle-xe%2Fissues%2F96%23issuecomment-1079814243&data=04%7C01%7C%7C43477342f7c744bbb94608da0f952dea%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637839430642701931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=PPFy1oDq73gaY%2B%2BQTZ1JXqt%2FddXHSmKXZmlGcVWVHIc%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPMZT5EH6HF3QPU4PMJVHTVB66BLANCNFSM5RLK7ONA&data=04%7C01%7C%7C43477342f7c744bbb94608da0f952dea%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637839430642701931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Yqgiw1%2F0rRVLIEofj0DHPapHP203cmQspldBmRc84Uk%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

aminadatia commented 2 years ago

Hi

I think I have the command as docker cp blah

Regards Amin Adatia


From: Amin Adatia @.> Sent: Saturday, March 26, 2022 10:26:46 PM To: gvenzl/oci-oracle-xe @.>; gvenzl/oci-oracle-xe @.> Cc: Mention @.> Subject: Re: [gvenzl/oci-oracle-xe] File Permissions and Copying files (Issue #96)

Hi

I downloaded SQL Developer and installed on my Windows for Linux. Extracted the Kafka zip file. Installed to XE database. Realized it had to be run from within the Docker Container 21cFull. I then did cp file-from-wsl to file to 21cFull container location. The file copies but owner is 1000:1000 . I tried to do chown to oracle:oinstall but I get permission denied. I can go to /opt/oracle and all the directories and files are owned by oracle.

Regards

Regards Amin Adatia


From: Gerald Venzl @.> Sent: Saturday, March 26, 2022 9:57:41 PM To: gvenzl/oci-oracle-xe @.> Cc: Amin Adatia @.>; Mention @.> Subject: Re: [gvenzl/oci-oracle-xe] File Permissions and Copying files (Issue #96)

Hi @aminadatiahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faminadatia&data=04%7C01%7C%7C43477342f7c744bbb94608da0f952dea%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637839430642701931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4QdraikjsHzgMv6Br9bakSA1vxe8q%2BDJWtXihmqIED4%3D&reserved=0,

Could you please elaborate on how you copy these files into the container?

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgvenzl%2Foci-oracle-xe%2Fissues%2F96%23issuecomment-1079814243&data=04%7C01%7C%7C43477342f7c744bbb94608da0f952dea%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637839430642701931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=PPFy1oDq73gaY%2B%2BQTZ1JXqt%2FddXHSmKXZmlGcVWVHIc%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPMZT5EH6HF3QPU4PMJVHTVB66BLANCNFSM5RLK7ONA&data=04%7C01%7C%7C43477342f7c744bbb94608da0f952dea%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637839430642701931%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Yqgiw1%2F0rRVLIEofj0DHPapHP203cmQspldBmRc84Uk%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

gvenzl commented 2 years ago

Hi @aminadatia,

You can chown them via the root user: docker exec -u 0 <container> chown ...

aminadatia commented 2 years ago

Hi Thanks. I will try this

Regards Amin Adatia


From: Gerald Venzl @.> Sent: Thursday, March 31, 2022 1:09:59 AM To: gvenzl/oci-oracle-xe @.> Cc: Amin Adatia @.>; Mention @.> Subject: Re: [gvenzl/oci-oracle-xe] File Permissions and Copying files (Issue #96)

Hi @aminadatiahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faminadatia&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=PPIh%2Fx1xXF%2FVoWB6xVrjiPM%2BL4gm5AFBs31HMxUeaIo%3D&reserved=0,

You can chown them via the root user: docker exec -u 0 chown ...

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgvenzl%2Foci-oracle-xe%2Fissues%2F96%23issuecomment-1084081957&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mWCN3D8eaMdy44FzJLIIWYw0GDHdxg%2FhnviDYmuzhFI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPMZT7436HAMT4R33K3OTDVCUXSPANCNFSM5RLK7ONA&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QDRNcuA1viH30G2rXmkBV7CPgwobiJXxRCLkGKtxqaw%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

aminadatia commented 2 years ago

Hi

Excellent! Thank you!


From: Gerald Venzl @.> Sent: March 31, 2022 01:09 To: gvenzl/oci-oracle-xe @.> Cc: Amin Adatia @.>; Mention @.> Subject: Re: [gvenzl/oci-oracle-xe] File Permissions and Copying files (Issue #96)

Hi @aminadatiahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faminadatia&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=PPIh%2Fx1xXF%2FVoWB6xVrjiPM%2BL4gm5AFBs31HMxUeaIo%3D&reserved=0,

You can chown them via the root user: docker exec -u 0 chown ...

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgvenzl%2Foci-oracle-xe%2Fissues%2F96%23issuecomment-1084081957&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mWCN3D8eaMdy44FzJLIIWYw0GDHdxg%2FhnviDYmuzhFI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPMZT7436HAMT4R33K3OTDVCUXSPANCNFSM5RLK7ONA&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QDRNcuA1viH30G2rXmkBV7CPgwobiJXxRCLkGKtxqaw%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

aminadatia commented 2 years ago

Hi

Do you know how I can install a File Manager and an Editor in the Container 21cFull?

Regards, Amin


From: Gerald Venzl @.> Sent: March 31, 2022 01:09 To: gvenzl/oci-oracle-xe @.> Cc: Amin Adatia @.>; Mention @.> Subject: Re: [gvenzl/oci-oracle-xe] File Permissions and Copying files (Issue #96)

Hi @aminadatiahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faminadatia&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=PPIh%2Fx1xXF%2FVoWB6xVrjiPM%2BL4gm5AFBs31HMxUeaIo%3D&reserved=0,

You can chown them via the root user: docker exec -u 0 chown ...

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgvenzl%2Foci-oracle-xe%2Fissues%2F96%23issuecomment-1084081957&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mWCN3D8eaMdy44FzJLIIWYw0GDHdxg%2FhnviDYmuzhFI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPMZT7436HAMT4R33K3OTDVCUXSPANCNFSM5RLK7ONA&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QDRNcuA1viH30G2rXmkBV7CPgwobiJXxRCLkGKtxqaw%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

gvenzl commented 2 years ago

Hi @aminadatia,

Sorry, I do not. Perhaps https://forums.docker.com/ is a good place to ask that question.

aminadatia commented 2 years ago

Hi

Sorry to bother you again.

I am trying to install ORA_KAFKA in the Oracle XE-21c database. I need to have Java 11 in the container. Below is my Dockerfile. None of the RUN options work though.

I have downloaded the openjdk using docker pull openjdk but I am now lost as to what to do.

Start with the Oracle image

FROM gvenzl/oracle-xe:21-full

we need to be root to do the this

USER root

Download and install JDK 11

None of these work

RUN dnf install java-11-openjdk.x86_64 -y

RUN apt-get update && apt-get install -y default-jdk

RUN install openjdk-11-jre openjdk-11-jdk

#

back to default user

USER 1000

RUN java --version

Regards


From: Gerald Venzl @.> Sent: March 31, 2022 01:09 To: gvenzl/oci-oracle-xe @.> Cc: Amin Adatia @.>; Mention @.> Subject: Re: [gvenzl/oci-oracle-xe] File Permissions and Copying files (Issue #96)

Hi @aminadatiahttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faminadatia&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=PPIh%2Fx1xXF%2FVoWB6xVrjiPM%2BL4gm5AFBs31HMxUeaIo%3D&reserved=0,

You can chown them via the root user: docker exec -u 0 chown ...

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgvenzl%2Foci-oracle-xe%2Fissues%2F96%23issuecomment-1084081957&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=mWCN3D8eaMdy44FzJLIIWYw0GDHdxg%2FhnviDYmuzhFI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAOPMZT7436HAMT4R33K3OTDVCUXSPANCNFSM5RLK7ONA&data=04%7C01%7C%7C2659f6a2b62b423a3e0008da12d4b4a2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637843002014133521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QDRNcuA1viH30G2rXmkBV7CPgwobiJXxRCLkGKtxqaw%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>