-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run commands without sudo: "EACCES: permission denied" error #2791
Comments
Hello @jonathanmorris180 👋 It looks like you didn't include the full Salesforce CLI version information in your issue. A few more things to check:
Thank you! |
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
@jonathanmorris180 did you |
@cristiand391 I can try doing that for the latest release installed with |
This issue has not received a response in 7 days. It will auto-close in 7 days unless a response is posted. |
@cristiand391 Any further info on this? Would be great to get a resolution. |
@jonathanmorris180 sorry, I was out most of the last week. can you check if you have a log file owned by the root user?
I can repro the error when I change to owner of any log to root (
and then change the owner back to my username:
|
Hi @cristiand391, no worries, thanks for looking into it. All the log files and the ls -la ~ | grep -E "(\.sf)$"
drwx------ 16 jonathanmorris staff 512 Apr 4 20:00 .sf ls -la ~/.sf/*.log
-rw-r--r-- 1 jonathanmorris staff 588 Mar 29 12:02 /Users/jonathanmorris/.sf/sf-2024-03-29.log
-rw-r--r-- 1 jonathanmorris staff 3087 Apr 1 17:59 /Users/jonathanmorris/.sf/sf-2024-04-01.log
-rw-r--r-- 1 jonathanmorris staff 735 Apr 2 16:08 /Users/jonathanmorris/.sf/sf-2024-04-02.log
-rw-r--r-- 1 jonathanmorris staff 2352 Apr 3 19:23 /Users/jonathanmorris/.sf/sf-2024-04-03.log
-rw-r--r-- 1 jonathanmorris staff 1470 Apr 4 19:58 /Users/jonathanmorris/.sf/sf-2024-04-04.log
-rw-r--r-- 1 jonathanmorris staff 1176 Apr 4 20:34 /Users/jonathanmorris/.sf/sf-2024-04-05.log
-rw-r--r-- 1 jonathanmorris staff 0 Mar 23 20:15 /Users/jonathanmorris/.sf/sf.log Weirdly, I just tried updating to the latest version again and now somehow it's working: npm list -g
/Users/jonathanmorris/.nvm/versions/node/v20.11.1/lib
├── @salesforce/[email protected]
├── [email protected]
└── [email protected] npm install --global @salesforce/[email protected]
added 229 packages, removed 162 packages, and changed 808 packages in 45s
120 packages are looking for funding
run `npm fund` for details sf --version
› Warning: @salesforce/cli update available from 2.33.3 to 2.35.6.
@salesforce/cli/2.33.3 darwin-arm64 node-v20.11.1 Weird issue, but at least it was only temporary! Thanks for the help. |
Summary
I recently updated my Salesforce CLI to the latest version. Now, whenever I run any commands, I'm getting errors like this:
Steps To Reproduce
sf org list --json
)Expected result
It outputs the expected orgs as json
Actual result
You get the error above
System Information
Using shell
zsh
System information:
Additional information
~/.sf
directory and I have all needed permissions:npm i -g @salesforce/[email protected]
and still had the same issuesudo
makes commands work/Users/jonathanmorris/.sf/sf-2024-03-23.log
:Update:
I downgraded to
@salesforce/[email protected]
with npm and it started working. Would love to know what the issue is with later versions.The text was updated successfully, but these errors were encountered: