https://www.mobilefish.com/developer/blockchain/blockchain_quickguide_truffle.html
When I come to the 5. step (truffle init, or truffle version) I get:
Error: EACCES: permission denied, open ‘/Users/user/.config/truffle/config.json’
You don’t have access to this file.
Tried checking firewall, clearing permissions, reinstalling nodejs, using atom package installer… and there is one simple thing that fixed it:
instead of initiating truffle with the following code:
truffle init
use this code
sudo truffle init
-----
edit: The issue persisted in the second and third lecture so I’ve tried to do it manually in the OSX finder folder and finally found the best way to solve the issue beforeand. I’m giving my full guide for solving "EACCESS: Permission denied problem.
Open Finder and go to the folder which you need to modify. In my case the path is:
STEP 1:
SSD disk --> users–>me–>ivancourse. This is the folder which cannot be accessed due to the missing permissions.
STEP 2: Rightclick Ivancourse --> Get info
At the bottom you will see Sharing options. In my case, I see for example staff, everyone and me. Enable read & write permissions (“privilege tab”) and confirm it with your password.
If you don’t see your default account “me” or “admin” or whatever, then click the + icon and add it here with read&write permissions.
STEP 3: Click the gear icon and select Apply to all enclosed items.
That’s the fix which is most user-friendly from my perspective.
But still, there are still some issues which I haven’t been able to resolve… for example I wasn’t able to compile with:
sudo truffle compile