Why is bash, when run by unshare, unable to fork any processes? [duplicate]









up vote
1
down vote

favorite
1













This question already has an answer here:



  • unshare --pid /bin/bash - fork cannot allocate memory

    2 answers



I am using Arch Linux, and trying to do some experiments about linux namespace. I use the following command but doesn't get bash to work.



xtricman⚓ArchVirtual⏺️~🤐unshare -muinpUC --propagation slave --setgroups deny /usr/bin/bash
Could not get property: Access denied
nobody⚓⏺️~🤐ls
bash: fork: Cannot allocate memory
nobody⚓⏺️~🤐


Then No external commands can be run by the shell, could anybody explain the reason to me?










share|improve this question















marked as duplicate by Community Nov 20 at 6:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





migrated from unix.stackexchange.com Oct 24 at 16:34


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • The question title is contradicted by the body, which clearly shows the Bourne Again shell running, chained-to from unshare.
    – JdeBP
    Oct 23 at 6:55














up vote
1
down vote

favorite
1













This question already has an answer here:



  • unshare --pid /bin/bash - fork cannot allocate memory

    2 answers



I am using Arch Linux, and trying to do some experiments about linux namespace. I use the following command but doesn't get bash to work.



xtricman⚓ArchVirtual⏺️~🤐unshare -muinpUC --propagation slave --setgroups deny /usr/bin/bash
Could not get property: Access denied
nobody⚓⏺️~🤐ls
bash: fork: Cannot allocate memory
nobody⚓⏺️~🤐


Then No external commands can be run by the shell, could anybody explain the reason to me?










share|improve this question















marked as duplicate by Community Nov 20 at 6:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





migrated from unix.stackexchange.com Oct 24 at 16:34


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.














  • The question title is contradicted by the body, which clearly shows the Bourne Again shell running, chained-to from unshare.
    – JdeBP
    Oct 23 at 6:55












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1






This question already has an answer here:



  • unshare --pid /bin/bash - fork cannot allocate memory

    2 answers



I am using Arch Linux, and trying to do some experiments about linux namespace. I use the following command but doesn't get bash to work.



xtricman⚓ArchVirtual⏺️~🤐unshare -muinpUC --propagation slave --setgroups deny /usr/bin/bash
Could not get property: Access denied
nobody⚓⏺️~🤐ls
bash: fork: Cannot allocate memory
nobody⚓⏺️~🤐


Then No external commands can be run by the shell, could anybody explain the reason to me?










share|improve this question
















This question already has an answer here:



  • unshare --pid /bin/bash - fork cannot allocate memory

    2 answers



I am using Arch Linux, and trying to do some experiments about linux namespace. I use the following command but doesn't get bash to work.



xtricman⚓ArchVirtual⏺️~🤐unshare -muinpUC --propagation slave --setgroups deny /usr/bin/bash
Could not get property: Access denied
nobody⚓⏺️~🤐ls
bash: fork: Cannot allocate memory
nobody⚓⏺️~🤐


Then No external commands can be run by the shell, could anybody explain the reason to me?





This question already has an answer here:



  • unshare --pid /bin/bash - fork cannot allocate memory

    2 answers







linux namespaces






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 4:18









mpb

686811




686811










asked Oct 23 at 6:44









神秘德里克

294211




294211




marked as duplicate by Community Nov 20 at 6:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





migrated from unix.stackexchange.com Oct 24 at 16:34


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.






marked as duplicate by Community Nov 20 at 6:49


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





migrated from unix.stackexchange.com Oct 24 at 16:34


This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.













  • The question title is contradicted by the body, which clearly shows the Bourne Again shell running, chained-to from unshare.
    – JdeBP
    Oct 23 at 6:55
















  • The question title is contradicted by the body, which clearly shows the Bourne Again shell running, chained-to from unshare.
    – JdeBP
    Oct 23 at 6:55















The question title is contradicted by the body, which clearly shows the Bourne Again shell running, chained-to from unshare.
– JdeBP
Oct 23 at 6:55




The question title is contradicted by the body, which clearly shows the Bourne Again shell running, chained-to from unshare.
– JdeBP
Oct 23 at 6:55












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Perhaps you need run unshare with -f?



See: unshare --pid /bin/bash - fork cannot allocate memory






share|improve this answer



























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Perhaps you need run unshare with -f?



    See: unshare --pid /bin/bash - fork cannot allocate memory






    share|improve this answer
























      up vote
      0
      down vote













      Perhaps you need run unshare with -f?



      See: unshare --pid /bin/bash - fork cannot allocate memory






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Perhaps you need run unshare with -f?



        See: unshare --pid /bin/bash - fork cannot allocate memory






        share|improve this answer












        Perhaps you need run unshare with -f?



        See: unshare --pid /bin/bash - fork cannot allocate memory







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 10 at 2:16









        mpb

        686811




        686811













            Popular posts from this blog

            How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

            Syphilis

            Darth Vader #20