[BUG] --dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 15 comments · opened Oct 8, 2025 · closed Mar 9, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I try to run --dangerously-skip-permissions I get the error cannot be used with root/sudo privileges for security reasons
What Should Happen?
Claude Code should run as I choose it to run. If I choose to sandbox I'm taking my own safety into my own hands.
Error Messages/Logs
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasons
Steps to Reproduce
- Install Claude Code
- Run claude --dangerously-skip-permissions with a root account
- enjoy Claude being obtuse and refusing to start.
This is an ignorant change. Revert this or allow us a parameter to override. I run CC sandboxed, my risk is my business. This is the last straw before I permanently move the team to Codex.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.10
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Warp
Additional Information
_No response_
15 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I've seen the work arounds in those is_sandbox=1 claude --dangerously-skip-permissions, but it doesn't work. While claude will run with this parameter, it still asks for permissions constantly, which is useless to me. DO NOT CLOSE THIS TICKET UNTIL FIXED.
@omayhemo Try
su nodeclaude --dangerously-skip-permissions@omayhemo
FYI.
IS_SANDBOX=1 claude --dangerously-skip-permissionsworks fine for me.
Add:
To
claudeCode.environmentVariablesif using the plugin.This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
ARGH! I need --dangerously-skip-permissions as root. How do I bypass this crap?
NM reading helps
IS_SANDBOX=1 claude --dangerously-skip-permissions
This solve the problem.
should simply add to message,
If I run directly
IS_SANDBOX=1 claude --dangerously-skip-permissions, it works.But I don't want to always type this long command in my safe container. I want it is default and I only need to start with
claude.So, I set the environment variable
IS_SANDBOXto1globally, and having/root/.claude/settings.json:Unfortunately, I got this error:
Easy, add an alias, like ccglmskip = IS_SANDBOX=1 start-claude ccglmskip, to your bashrc
oh, wait. When I access
https://claude.ai/oauth/authorize ...I seeClaude is currently experiencing a temporary service disruption.So, maybe it is just coincident. I will wait until the service is stable and try again.
It works, everybody! The error I reported was just a coincident of unstable claude server side.
With the configuration above, life is easy now.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.