I need your help with an access issue with neofetch on my macOS.
Here the thing, I recently install neofetch on my terminal (oh-my-zsh), it works but, between the firts line (last login) and the logo that displays :
mkdir: /Users/'MYUSERNAME'/.config/neofetch/: Permission denied
/usr/local/bin/Neofetch: line 4476:
/Users/'MYUSERNAME'/.config/neofetch/config.conf: Permission denied
And I don't know why, of course, I did many types of research on google before asking you.
Do you have an idea?
You need to change the permissions for your config directory:
sudo chmod -R 666 /Users/YOURUSERNAME/.config
666 means Read-Write for all users.
Doing the same as garritfra did but with that last directory line you have there worked for me on a windows 10 machine though. It may work for the mac as well?
sudo chmod -R 666 /Users/MYUSERNAME/.config/neofetch/config.conf
Replace MYUSERNAME with whatever is shown in the error.
I was having the same issue and was able to solve this in the following way:
Open up Finder
Reveal hidden folders & files by pressing CMD+>+SHIFT
Locate the .config folder and right click it and click 'get info'.
Under the sharing & permissions section click the small plus and just add the entire Administrators group and remember to change the permissions to read & write for the entire group.
neofetch
Here is a bulletproof one-liner that solves the issue:
sudo chmod -R 710 $HOME/.config
Execute this command in a terminal session.
After restarting your terminal or, alternatively, sourcing your shell configuration file (assuming you have added the neofetch command to that file) with:
source ~/.zshrc
(replacing ~/.zshrc with the path to your shell configuration file if you are using a different one), the error prompt should disappear.
Note that this only gives 'execute' permission to the 'group' class. There is no need, as the currently accepted answer suggests, to give 666 or 777 modes as that needlessly makes your system less secure (not to mention even no. octal figures such as 666 don't even work as they fail to give the required 'execute' permission, which requires an odd number bit).
Modes such as 730, 750, and 770 will work, but unless something changes in neofetch's future update that demands it, it is unnecessarily too generous and I wouldn't advise it.
Finally, there is absolutely no reason to give users in the 'other' class any permission to the ~/.config directory (unless you have a very compelling reason to), and hence the last permission bit (3rd digit in the mode represented by octal numbers) should always remain 0.
I would like to open the browser(no matter which), and browse a specific website, say, youtube.com. And I'd like to run it from a .sh file.
I have tried:
1.python -mwebbrowser http://youtube.com
2.gnome-open "http://www.youtube.com"
3.xdg-open "http://www.youtube.com"
4.open "http://www.youtube.com"
All of them got zsh: permission denied: ./try.sh error. How can I solve this problem? Thank you in advance!
it sounds like the try.sh file itself is missing executable permissions. please try doing:
chmod a+rx try.sh
I have a file I downloaded from the Internet. When I run it in the osx terminal, one of the automated things it does is make a new directory in my /usr/local/bin, but this fails as terminal says that permission is denied. How do I give this file permission to execute the mkdir command? I know how to give myself permission with sudo, but not how to give this file permission to do the same on its own.
You can give your user permission to that folder by running sudo chown -R $(whoami) /usr/local/bin/. Once you make sure you own the directory and sub-directories (ls -l /usr/local and ls -l /usr/local/bin) your script should be able to write to those directories as well.
As a general rule of thumb, sudoing to work around permission errors just makes the problem worse. Fixing the underlying permissions take a few extra minutes but is better in the long run.
I am trying to set up java on XCODE and it needs to access /usr/bin/java at some point. But I cannot get hold of this folder and I get this message:
The folder “java” can’t be opened because you don’t have permission to see its contents.
Even when I try to reach the permission through Get Info the system does not open the folder because of the same restriction. I think it is possible to change the permission through Terminal but I am afraid to blow up something on my mac.
How can I change the permission safely?
As the root user ("sudo su -" from the command line and then enter system password), execute the following from the command line -- "chmod 777 /usr/bin/java" . That won't blow anything up, and will allow read/write/execute (rwx) to the directory's owner, group, and guests.
-TU
I want to remove an Adobe folder with empty subfolders. I am using Git Bash on Windows 8 to chmod -R 777 Adobe/ but I am getting this error: changing permissions of 'insert_directory_here': Permission denied. Does anyone know what I can possibly do to delete this empty folders/subfolders? Thank you.