/dev/null permission denied in chroot environment












0















I have Xubuntu 18.04 in a chroot environment. I just dropped it in there from a VM I had of it.



Going into the chroot environment, if I try to run apt update I get this error:



/usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied



I have tried most of the solutions here: https://unix.stackexchange.com/questions/146633/bash-dev-null-permission-denied
As well as this solution: https://superuser.com/a/814594 Neither worked. Same exact output.



Is there some way I can get this working? Thanks in advance.










share|improve this question



























    0















    I have Xubuntu 18.04 in a chroot environment. I just dropped it in there from a VM I had of it.



    Going into the chroot environment, if I try to run apt update I get this error:



    /usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied



    I have tried most of the solutions here: https://unix.stackexchange.com/questions/146633/bash-dev-null-permission-denied
    As well as this solution: https://superuser.com/a/814594 Neither worked. Same exact output.



    Is there some way I can get this working? Thanks in advance.










    share|improve this question

























      0












      0








      0








      I have Xubuntu 18.04 in a chroot environment. I just dropped it in there from a VM I had of it.



      Going into the chroot environment, if I try to run apt update I get this error:



      /usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied



      I have tried most of the solutions here: https://unix.stackexchange.com/questions/146633/bash-dev-null-permission-denied
      As well as this solution: https://superuser.com/a/814594 Neither worked. Same exact output.



      Is there some way I can get this working? Thanks in advance.










      share|improve this question














      I have Xubuntu 18.04 in a chroot environment. I just dropped it in there from a VM I had of it.



      Going into the chroot environment, if I try to run apt update I get this error:



      /usr/bin/apt-key: 624: /usr/bin/apt-key: cannot create /dev/null: Permission denied



      I have tried most of the solutions here: https://unix.stackexchange.com/questions/146633/bash-dev-null-permission-denied
      As well as this solution: https://superuser.com/a/814594 Neither worked. Same exact output.



      Is there some way I can get this working? Thanks in advance.







      apt permissions chroot






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 22 at 4:46









      BatcastleBatcastle

      988




      988






















          2 Answers
          2






          active

          oldest

          votes


















          1














          From man null:



             These devices are typically created by:

          mknod -m 666 /dev/null c 1 3
          mknod -m 666 /dev/zero c 1 5
          chown root:root /dev/null /dev/zero


          These commands would have to be executed in the chroot environment.






          share|improve this answer
























          • I tried this and It didn't help. Same exact error.

            – Batcastle
            Jan 22 at 5:05



















          0














          Figured out the issue. It wasn't readable/writable by all users. Changed it so all users could read and write and it worked. Thanks anyways!






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111839%2fdev-null-permission-denied-in-chroot-environment%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            From man null:



               These devices are typically created by:

            mknod -m 666 /dev/null c 1 3
            mknod -m 666 /dev/zero c 1 5
            chown root:root /dev/null /dev/zero


            These commands would have to be executed in the chroot environment.






            share|improve this answer
























            • I tried this and It didn't help. Same exact error.

              – Batcastle
              Jan 22 at 5:05
















            1














            From man null:



               These devices are typically created by:

            mknod -m 666 /dev/null c 1 3
            mknod -m 666 /dev/zero c 1 5
            chown root:root /dev/null /dev/zero


            These commands would have to be executed in the chroot environment.






            share|improve this answer
























            • I tried this and It didn't help. Same exact error.

              – Batcastle
              Jan 22 at 5:05














            1












            1








            1







            From man null:



               These devices are typically created by:

            mknod -m 666 /dev/null c 1 3
            mknod -m 666 /dev/zero c 1 5
            chown root:root /dev/null /dev/zero


            These commands would have to be executed in the chroot environment.






            share|improve this answer













            From man null:



               These devices are typically created by:

            mknod -m 666 /dev/null c 1 3
            mknod -m 666 /dev/zero c 1 5
            chown root:root /dev/null /dev/zero


            These commands would have to be executed in the chroot environment.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 22 at 5:00









            waltinatorwaltinator

            22.4k74169




            22.4k74169













            • I tried this and It didn't help. Same exact error.

              – Batcastle
              Jan 22 at 5:05



















            • I tried this and It didn't help. Same exact error.

              – Batcastle
              Jan 22 at 5:05

















            I tried this and It didn't help. Same exact error.

            – Batcastle
            Jan 22 at 5:05





            I tried this and It didn't help. Same exact error.

            – Batcastle
            Jan 22 at 5:05













            0














            Figured out the issue. It wasn't readable/writable by all users. Changed it so all users could read and write and it worked. Thanks anyways!






            share|improve this answer




























              0














              Figured out the issue. It wasn't readable/writable by all users. Changed it so all users could read and write and it worked. Thanks anyways!






              share|improve this answer


























                0












                0








                0







                Figured out the issue. It wasn't readable/writable by all users. Changed it so all users could read and write and it worked. Thanks anyways!






                share|improve this answer













                Figured out the issue. It wasn't readable/writable by all users. Changed it so all users could read and write and it worked. Thanks anyways!







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 22 at 5:12









                BatcastleBatcastle

                988




                988






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111839%2fdev-null-permission-denied-in-chroot-environment%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Human spaceflight

                    Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

                    張江高科駅