linux - Docker group and permissions - Stack Overflow (https://cdn.sstatic.net/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (Stack Overflow) (/opensearch.xml) (https://stackoverflow.com/questions/77024144/docker-group-and-permissions) (https://cdn.sstatic.net/Shared/stacks.css?v=619122b796ae) (https://cdn.sstatic.net/Sites/stackoverflow/primary.css?v=02dcb5186b90) (Feed for question 'Docker group and permissions') (/feeds/question/77024144) (https://cdn.sstatic.net/Shared/Channels/channels.css?v=5981bb1a5bd7) (https://accounts.google.com/gsi/style) (site logo) Join Stack Overflow By clicking “Sign up”, you agree to our (/legal/terms-of-service/public) terms of service and acknowledge you have read our (/legal/privacy-policy) privacy policy . (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) (1) (undefined) (2.0) Sign up with Google Sign up with GitHub OR (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) (1) (undefined) Email Password (8+ characters (at least 1 letter & 1 number)) Sign up Already have an account? (/users/login) Log in (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) () Skip to main content (https://stackoverflow.com) Stack Overflow (https://stackoverflow.co/) About Products (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav-bar&utm_content=overflowai) OverflowAI (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-for-teams) Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=stack-overflow-advertising) Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-ai) OverflowAI GenAI features for Teams (https://stackoverflow.co/api-solutions/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=overflow-api) OverflowAPI Train & fine-tune LLMs (https://stackoverflow.co/labs/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=labs) Labs The future of collective knowledge sharing (https://stackoverflow.co/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=about-the-company) About the company (https://stackoverflow.blog/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=top-nav&utm_content=blog) Visit the blog (Search…) () Loading… (https://stackoverflow.com) current community (https://stackoverflow.com) (Stack Overflow) Stack Overflow (https://stackoverflow.com/help) help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) chat (https://meta.stackoverflow.com) (Meta Stack Overflow) Meta Stack Overflow your communities (https://stackoverflow.com/users/signup?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f77024144%2fdocker-group-and-permissions) Sign up or (https://stackoverflow.com/users/login?ssrc=site_switcher&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f77024144%2fdocker-group-and-permissions) log in to customize your list. (https://stackexchange.com/sites) more stack exchange communities (https://stackoverflow.blog) company blog (Click to show search) (https://stackoverflow.com/users/login?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f77024144%2fdocker-group-and-permissions) Log in (https://stackoverflow.com/users/signup?ssrc=head&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f77024144%2fdocker-group-and-permissions) Sign up (/) Home (/questions) Questions (/tags) Tags (/users) Users (https://stackoverflow.com/jobs/companies?so_medium=stackoverflow&so_source=SiteNav) Companies Labs (/jobs?source=so-left-nav) Jobs (/beta/discussions) Discussions Collectives Communities for your favorite technologies. (/collectives-all) Explore all Collectives Teams Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat. (https://stackoverflow.co/teams/ai/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=overflowai-learn-more) Learn more (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams) Explore Teams Teams Ask questions, find answers and collaborate at work with Stack Overflow for Teams. (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=side-bar&utm_content=explore-teams-compact) Explore Teams Collectives™ on Stack Overflow Find centralized, trusted content and collaborate around the technologies you use most. (/collectives) Learn more about Collectives Teams Q&A for work Connect and share knowledge within a single location that is structured and easy to search. (https://stackoverflow.co/teams/) Learn more about Teams Get early access and see previews of new features. (https://stackoverflow.co/labs/) Learn more about Labs (https://cdn.sstatic.net/Sites/stackoverflow/Img/apple-touch-icon.png?v=c78bd457575a) (/questions/77024144/docker-group-and-permissions) Docker group and permissions (/questions/ask) Ask Question (2023-09-01 14:55:18Z) Asked 12 months ago Modified (?lastactivity) (2023-09-03 16:29:38Z) 12 months ago (Viewed 836 times) Viewed 836 times This question shows research effort; it is useful and clear (70:3:31e,16:c4e1d94080827c10,10:1725174432,16:9c23e4f1e7337520,8:77024144,89006692bf8b88158a13ddee815f0ae277a46050bc53b2f8dc4e2bacae8b3181) 0 (This question does not show any research effort; it is unclear or not useful) (70:3:31e,16:ccab0e1a33281f9e,10:1725174432,16:812a94d202673b02,8:77024144,bdb65eb92dc1ce8c772618efd23a3df013f83d0e5c9b70cc857afe945a60e7be) Save this question. (/posts/77024144/timeline) Show activity on this post. I am learning penetration testing, and I am trying to perform linux privilege escalation using docker. So I created a new user with the minimum permissions and I added it to the docker group. The problem now is that this new user cannot run docker. I tried to change the permission for this user using chmod but it does not work. Can anyone help me please to permit the new user to run docker!! this is the new user: pentester:x:1001:1001::/home/pentester:/bin/bash and this is the docker group: docker:x:976:anasgharsa,pentester and when I am connected with the new user and try docker images or docker ps I get this error message : "unable to get absolute bin path: stat .: permission denied" (/questions/tagged/linux) (show questions tagged 'linux') linux (/questions/tagged/docker) (show questions tagged 'docker') docker (/questions/tagged/permissions) (show questions tagged 'permissions') permissions (/q/77024144) (Short permalink to this question) Share Share a link to this question Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/77024144/edit) () Improve this question Follow (70:3:31e,16:85c1739647bc5e15,10:1725174432,16:809790808042d6ce,8:77024144,0d4f105a1d348010bd6da71d51780913d4647eb5f81c588df89bb33747eb10db) Follow this question to receive notifications (/posts/77024144/revisions) (show all edits to this post) edited (2023-09-03 16:29:38Z) Sep 3, 2023 at 16:29 (/users/685806/pino) (Pino's user avatar) (/users/685806/pino) Pino (reputation score) 9,123 (7 gold badges) 7 7 gold badges (56 silver badges) 56 56 silver badges (74 bronze badges) 74 74 bronze badges asked (2023-09-01 14:55:18Z) Sep 1, 2023 at 14:55 (/users/18059093/anas-gharsa) (Anas Gharsa's user avatar) (/users/18059093/anas-gharsa) Anas Gharsa Anas Gharsa (reputation score) 1 (1 bronze badge) 1 1 bronze badge (Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.) Add a comment | (Expand to show all comments on this post) 1 Answer 1 Sorted by: (/questions/77024144/docker-group-and-permissions?answertab=scoredesc#tab-top) Reset to default (scoredesc) Highest score (default) (trending) Trending (recent votes count more) (modifieddesc) Date modified (newest first) (createdasc) Date created (oldest first) This answer is useful (70:3:31e,16:bd03eb0223c7fea2,10:1725174432,16:49c025252f2c0d9c,8:77025418,f5c936b0634f46c363f659e259bd9b7427f409400be12bf5f171f7c9b2e70008) 0 (This answer is not useful) (70:3:31e,16:74beba093fed8a03,10:1725174432,16:b32fad5bc7fbd004,8:77025418,5ee0d9fbb0c79d33f007f83c49d347f53e79dc4aa99feb78735b1d3855e8836e) Save this answer. (Loading when this answer was accepted…) (/posts/77025418/timeline) Show activity on this post. It seems like user doesn't have the necessary permissions to run Docker. I hope that you have included your user "pentester" in the following way: sudo usermod -aG docker pentester First confirm that user is a member of the "docker" group, you can run the following command as the root user: grep '^docker:' /etc/group If not then add the user by executing following command: sudo usermod -aG docker pentester Confirm the user's membership in the "docker" group by executing the following command: groups pentester Restart the docker services by the following command: sudo service docker restart Start a new shell session. (/a/77025418) (Short permalink to this answer) Share Share a link to this answer Copy link (https://creativecommons.org/licenses/by-sa/4.0/) (The current license for this post: CC BY-SA 4.0) CC BY-SA 4.0 (/posts/77025418/edit) () Improve this answer Follow (70:3:31e,16:c0c351b725b46cbb,10:1725174432,16:89da1a7b94fb0f1b,8:77025418,73cdb35a75ad9f8e7afae71c0f18fe26efe0a841b873a6a56b59ea284d328630) Follow this answer to receive notifications answered (2023-09-01 18:47:41Z) Sep 1, 2023 at 18:47 (/users/22485325/vansh-damania) (Vansh Damania's user avatar) (/users/22485325/vansh-damania) Vansh Damania Vansh Damania (reputation score) 1 (1 bronze badge) 1 1 bronze badge 2 First of all, thank you for your reply, second, yes I did include pentester to the docker group using "sudo usermod -aG docker pentester" and then I restarted the docker service but still cannot run docker and that's why I posted my question here trying to find some answers.when I execute the command "grep '^docker:' /etc/group" I get this "docker:x:976:anasgharsa,pentester", even "groups pentester" this is what I get "pentester : pentester docker". I searched everywhere to find how can pentester run docker but I find that I need to add him to the docker group but he is already in the group – (/users/18059093/anas-gharsa) (1 reputation) Anas Gharsa Commented (2023-09-02 10:10:26Z, License: CC BY-SA 4.0) Sep 2, 2023 at 10:10 no one can tell me how to resolve this problem?? is it that hard ?' should I give up already ? – (/users/18059093/anas-gharsa) (1 reputation) Anas Gharsa Commented (2023-09-03 13:30:33Z, License: CC BY-SA 4.0) Sep 3, 2023 at 13:30 (Use comments to ask for more information or suggest improvements. Avoid comments like “+1” or “thanks”.) Add a comment | (Expand to show all comments on this post) (77024144) (false) () Your Answer Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. (/help/gen-ai-policy) Learn more (true) Thanks for contributing an answer to Stack Overflow! 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 (/help/how-to-answer) tips on writing great answers . Draft saved Draft discarded (e2a58aec89e0105273f31cf44dffd45d868462dc661de60a7d67e669a7370ceb) Sign up or (/users/login?ssrc=question_page&returnurl=https%3a%2f%2fstackoverflow.com%2fquestions%2f77024144%2fdocker-group-and-permissions%23new-answer) log in Sign up using Google Sign up using Email and Password (false) (false) Submit Post as a guest Name () () Email Required, but never shown () () Post as a guest Name () () Email Required, but never shown () () Post Your Answer Discard By clicking “Post Your Answer”, you agree to our (https://stackoverflow.com/legal/terms-of-service/public) terms of service and acknowledge you have read our (https://stackoverflow.com/legal/privacy-policy) privacy policy .(1) Not the answer you're looking for? Browse other questions tagged (/questions/tagged/linux) (show questions tagged 'linux') linux (/questions/tagged/docker) (show questions tagged 'docker') docker (/questions/tagged/permissions) (show questions tagged 'permissions') permissions or (/questions/ask) ask your own question . The Overflow Blog (https://stackoverflow.blog/2024/08/30/mobile-observability-open-telemetry-embrace-ios-android-austin-emmons/?cb=1) (Mobile Observability: monitoring performance through cracked screens, old batteries, and crappy Wi-Fi) Mobile Observability: monitoring performance through cracked screens, old... Featured on Meta (Meta Stack Exchange) (https://meta.stackexchange.com/questions/401324/announcing-a-change-to-the-data-dump-process?cb=1) Announcing a change to the data-dump process (Meta Stack Exchange) (https://meta.stackexchange.com/questions/402121/bringing-clarity-to-status-tag-usage-on-meta-sites?cb=1) Bringing clarity to status tag usage on meta sites (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/431331/what-does-a-new-user-need-in-a-homepage-experience-on-stack-overflow?cb=1) What does a new user need in a homepage experience on Stack Overflow? (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/431399/staging-ground-reviewer-motivation?cb=1) Staging Ground Reviewer Motivation (Meta Stack Overflow) (https://meta.stackoverflow.com/questions/431273/feedback-requested-how-do-you-use-tag-hover-descriptions-for-curating-and-do-yo?cb=1) (Feedback requested: How do you use tag hover descriptions for curating and do you use the RSS feed feature?) Feedback requested: How do you use tag hover descriptions for curating and do... Related (https://stackoverflow.com/q/16047306?rq=1) (Question score (upvotes - downvotes)) 4464 (https://stackoverflow.com/questions/16047306/how-is-docker-different-from-a-virtual-machine?rq=1) How is Docker different from a virtual machine? (https://stackoverflow.com/q/9270734?rq=1) (Question score (upvotes - downvotes)) 3233 (https://stackoverflow.com/questions/9270734/ssh-permissions-are-too-open?rq=1) ssh "permissions are too open" (https://stackoverflow.com/q/22049212?rq=1) (Question score (upvotes - downvotes)) 2929 (https://stackoverflow.com/questions/22049212/copying-files-from-docker-container-to-host?rq=1) Copying files from Docker container to host (https://stackoverflow.com/q/24319662?rq=1) (Question score (upvotes - downvotes)) 3454 (https://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach?rq=1) From inside of a Docker container, how do I connect to the localhost of the machine? (https://stackoverflow.com/q/22907231?rq=1) (Question score (upvotes - downvotes)) 2513 (https://stackoverflow.com/questions/22907231/how-to-copy-files-from-host-to-docker-container?rq=1) How to copy files from host to Docker container? (https://stackoverflow.com/q/23935141?rq=1) (Question score (upvotes - downvotes)) 2332 (https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository?rq=1) How to copy Docker images from one host to another without using a repository (https://stackoverflow.com/q/24958140?rq=1) (Question score (upvotes - downvotes)) 3103 (https://stackoverflow.com/questions/24958140/what-is-the-difference-between-the-copy-and-add-commands-in-a-dockerfile?rq=1) What is the difference between the 'COPY' and 'ADD' commands in a Dockerfile? (https://stackoverflow.com/q/47854463?rq=1) (Question score (upvotes - downvotes)) 581 (https://stackoverflow.com/questions/47854463/docker-got-permission-denied-while-trying-to-connect-to-the-docker-daemon-socke?rq=1) Docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock (https://stackoverflow.com/q/30172605?rq=1) (Question score (upvotes - downvotes)) 2300 (https://stackoverflow.com/questions/30172605/how-do-i-get-into-a-docker-containers-shell?rq=1) How do I get into a Docker container's shell? (https://stackoverflow.com/q/17157721?rq=1) (Question score (upvotes - downvotes)) 2216 (https://stackoverflow.com/questions/17157721/how-to-get-a-docker-containers-ip-address-from-the-host?rq=1) How to get a Docker container's IP address from the host (https://stackexchange.com/questions?tab=hot) Hot Network Questions (German Language Stack Exchange) (https://german.stackexchange.com/questions/77882/can-you-use-sollen-the-same-way-as-should-in-sentences-about-possibility-tha) Can you use 'sollen' the same way as 'should' in sentences about possibility that something happens? (Mathematics Stack Exchange) (https://math.stackexchange.com/questions/4965309/why-does-average-of-monte-carlo-simulations-not-hold-for-simple-problem) Why does average of Monte Carlo simulations not hold for simple problem? (Ask Ubuntu) (https://askubuntu.com/questions/1525029/unable-to-update-ubuntu-24-04-after-incorrectly-installing-debian-key) Unable to update ubuntu 24.04 after incorrectly installing debian key (TeX - LaTeX Stack Exchange) (https://tex.stackexchange.com/questions/725529/modify-lplfitch-proof-style) Modify lplfitch proof style (Philosophy Stack Exchange) (https://philosophy.stackexchange.com/questions/116617/how-can-moral-disagreements-be-resolved-when-the-conflicting-parties-are-guided) How can moral disagreements be resolved when the conflicting parties are guided by fundamentally different value systems? (Space Exploration Stack Exchange) (https://space.stackexchange.com/questions/66793/what-is-happening-when-a-tv-satellite-stops-broadcasting-during-an-eclipse) What is happening when a TV satellite stops broadcasting during an "eclipse"? (MathOverflow) (https://mathoverflow.net/questions/477943/reconstruction-of-riemann-surface-from-a-germ-of-holomorphic-function) Reconstruction of Riemann surface from a germ of holomorphic function (Worldbuilding Stack Exchange) (https://worldbuilding.stackexchange.com/questions/261336/causal-reconciliation-is-this-a-viable-way-for-my-ftl-system-to-preserve-the-co) Causal Reconciliation: Is this a viable way for my FTL system to preserve the course of History? (Japanese Language Stack Exchange) (https://japanese.stackexchange.com/questions/105693/how-is-the-death-of-a-person-marked-in-japanese) How is the death of a person marked in Japanese? (Movies & TV Stack Exchange) (https://movies.stackexchange.com/questions/123329/70s-80s-animation-with-an-island-of-robots) 70s-80s animation with an island of robots (Geographic Information Systems Stack Exchange) (https://gis.stackexchange.com/questions/485416/is-the-ilike-operator-in-qgis-not-working-correctly) Is the ILIKE Operator in QGIS not working correctly? (Mathematica Stack Exchange) (https://mathematica.stackexchange.com/questions/306611/generate-vectors-with-a-certain-property) Generate vectors with a certain property (Aviation Stack Exchange) (https://aviation.stackexchange.com/questions/106480/has-a-tire-ever-exploded-inside-the-wheel-well) Has a tire ever exploded inside the Wheel Well? (Travel Stack Exchange) (https://travel.stackexchange.com/questions/191100/do-passengers-transiting-in-yvr-vancouver-from-international-to-us-go-through) Do passengers transiting in YVR (Vancouver) from international to US go through Canadian immigration? (Worldbuilding Stack Exchange) (https://worldbuilding.stackexchange.com/questions/261316/how-much-easier-harder-would-it-be-to-colonize-space-if-humans-found-a-method-of) How much easier/harder would it be to colonize space if humans found a method of giving ourselves bodies that could survive in almost anything? (Travel Stack Exchange) (https://travel.stackexchange.com/questions/191091/esta-is-not-letting-me-pay) ESTA is not letting me pay (Electrical Engineering Stack Exchange) (https://electronics.stackexchange.com/questions/723922/how-is-message-waiting-conveyed-to-home-pots-phone) How is message waiting conveyed to home POTS phone (Academia Stack Exchange) (https://academia.stackexchange.com/questions/213289/how-much-new-mathematics-should-we-learn-during-the-phd-are-the-courses-we-take) How much new mathematics should we learn during the PhD? Are the courses we take during the PhD really important? (Cross Validated) (https://stats.stackexchange.com/questions/653675/what-does-it-mean-to-say-that-a-statistical-model-is-a-location-family) What does it mean to say that a statistical model is a location family? (TeX - LaTeX Stack Exchange) (https://tex.stackexchange.com/questions/725531/how-to-frame-certain-cells-with-tabluar) How to frame certain cells with tabluar? (Academia Stack Exchange) (https://academia.stackexchange.com/questions/213261/journal-keeps-messing-with-my-proof) Journal keeps messing with my proof (Puzzling Stack Exchange) (https://puzzling.stackexchange.com/questions/128111/2-in-1-twin-puzzle) 2 in 1: Twin Puzzle (Politics Stack Exchange) (https://politics.stackexchange.com/questions/88867/has-the-us-said-why-electing-judges-is-bad-in-mexico-but-good-in-the-us) Has the US said why electing judges is bad in Mexico but good in the US? (Super User) (https://superuser.com/questions/1854210/is-there-a-way-to-isolate-2-operating-systems-on-2-different-hard-drives) Is there a way to isolate 2 operating systems on 2 different hard drives? more hot questions (/feeds/question/77024144) (Feed of this question and its answers) Question feed Subscribe to RSS Question feed To subscribe to this RSS feed, copy and paste this URL into your RSS reader. (https://stackoverflow.com/feeds/question/77024144) () (https://stackoverflow.com) (https://stackoverflow.com) Stack Overflow (/questions) Questions (/help) Help (https://chat.stackoverflow.com/?tab=site&host=stackoverflow.com) Chat (https://stackoverflow.co/) Products (https://stackoverflow.co/teams/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=teams) Teams (https://stackoverflow.co/advertising/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=advertising) Advertising (https://stackoverflow.co/advertising/employer-branding/?utm_medium=referral&utm_source=stackoverflow-community&utm_campaign=footer&utm_content=talent) Talent (https://stackoverflow.co/) Company (https://stackoverflow.co/) About (https://stackoverflow.co/company/press/) Press (https://stackoverflow.co/company/work-here/) Work Here (https://stackoverflow.com/legal) Legal (https://stackoverflow.com/legal/privacy-policy) Privacy Policy (https://stackoverflow.com/legal/terms-of-service/public) Terms of Service (/contact) Contact Us Cookie Settings (https://stackoverflow.com/legal/cookie-policy) Cookie Policy (https://stackexchange.com) Stack Exchange Network (https://stackexchange.com/sites#technology) Technology (https://stackexchange.com/sites#culturerecreation) Culture & recreation (https://stackexchange.com/sites#lifearts) Life & arts (https://stackexchange.com/sites#science) Science (https://stackexchange.com/sites#professional) Professional (https://stackexchange.com/sites#business) Business (https://api.stackexchange.com/) API (https://data.stackexchange.com/) Data (https://stackoverflow.blog?blb=1) Blog (https://www.facebook.com/officialstackoverflow/) Facebook (https://twitter.com/stackoverflow) Twitter (https://linkedin.com/company/stack-overflow) LinkedIn (https://www.instagram.com/thestackoverflow) Instagram Site design / logo © 2024 Stack Exchange Inc; user contributions licensed under (https://stackoverflow.com/help/licensing) CC BY-SA . rev 2024.8.29.14628