just installed XAMPP on my Mac. When I was trying to modify the upload dir in config.inc.php it says that the file was locked, and can't be unlocked due to the fact that I don't have permission to modify the folder. So I changed the my permission to the folder, and file was not locked anymore but I can't access 'phpmyadmin' anymore in my browser via http://localhost/phpmyadmin/, everytime I try, it says "Existing configuration file (./config.inc.php) is not readable."
I googled the solution, from this page, it says to use chown root:cpanelphpmyadmin config.inc.php to change the permission of the file. I did, but it says chown: cpanelphpmyadmin: Invalid argumentin my terminal window. I am get desperate here, anyone help me, please!
by the way, I tried deleting everything in the XAMPP folder in App folder, and create a new one, it doesn't work
rasel#rasel-Dell:~$ sudo -s
rasel#rasel-Dell:~$ type your password
root#rasel-Dell:/# cd /opt/lampp/phpmyadmin
root#rasel-Dell:/opt/lampp/phpmyadmin# chmod 644 config.inc.php
root#rasel-Dell:/opt/lampp/phpmyadmin# cd /
root#rasel-Dell: /opt/lampp/lampp restart
That's all, it works for me.
For OSX Mavericks and XAMPP 1.8.2-5 and 1.8.3-4 versions, you need to use the same chmod 644 mentioned above, but the directory is different.
cd /Applications/XAMPP/xamppfiles/phpmyadmin/
sudo chmod 644 config.inc.php
[enter your password]
I have solved the problem by creating a new config.inc.php file, copying all of the original locked config.inc.php content there and modifying the line
$cfg['Servers'][$i]['password'] = 'myserverpassword';
and deleting the original locked file. This is in case you are looking for changing the XAMPP configuration file so that you can access the servers where you have put a new password.
cd /Applications/XAMPP/xamppfiles/phpmyadmin/
sudo chmod 777 config.inc.php
[enter your password]
After you change your config.inc.php, you need to type:
sudo chmod 644 config.inc.php
Only sudo chmod 644 didnt work for me.
If you are using ubuntu 14.04 what you actually need to do is:
Go to terminal
type --> sudo nautilus
a file dialogue will be opened.
navigate the folder to computer/opt/lampp/phpmyadmin/config.inc.php
open the file
check for $cfg['Servers'][$i]['password'] = '';
change the above LOC to $cfg['Servers'][$i]['password'] = 'root';
and try opening the phpmy admin. Your problem will be successfully solved.
Related
I was trying to connect to an EC2 instance on AWS using chmod and ssh and some how lost permission to cd into my Downloads
Apparently must have messed something up while attempting to do it since it is my first time.
I forgot to cd into the location of my Key and instead and tried a bunch of things that did not work including
chmod 400 /Users/chistopherholder/Downloads
and
chmod 400 /Users/chistopherholder/Downloads/Key-name.pem
when I realized I needed to cd into the location (by looking air a different tutorial on YouTube) I tried and con the permission denied.
How do I revert what I have done? So that I can cd into Downloads like before.
There is a way to reset the permissions on a Mac terminal with by running
diskutil resetUserPermissions / `id -u`
This worked for me and allowed me to cd back into the Download file
What worked for me is resetting the permissions for "Files and Folders" of the Terminal app:
System Preferences -> Security & Privacy -> Privacy tab -> Files and Folders -> find the Terminal.app and check all the boxes next to:
Downloads folder
Documents folder
Desktop folder
I am using Xcode 10.1. Everytime I build my project I get this error:
/Users/{username}/Library/Developer/Xcode/DerivedData/{random_name}/Build/Intermediates.noindex/....
line 2: /Users/{username}/path_to_app/Pods/Target Support
Files/pod_name/... Permission denied
I already tried the accepted answer here. I also tried doing the sudo chown but those did not fix the error. These are the actual steps I did, multiple times:
Remove all files in the DerivedData
Do the sudo chown in both paths: DerivedData and path_to_app
Clean
Build
What am I missing?
What worked for me is using chmod. Here's the command chmod -R 755 {my_working_folder}. For an explanation of what the numbers represent, you may read this article.
Here's what worked for me.Navigate to the directory which contains the file (for which you receive "Permission Denied" error) ,Then in terminal type chmod 777 (your_file_name). What basically you are doing is giving read/write/execute permission to your file . For more info check this article - https://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/
I am trying to install Testlink on OS X for Mac. However, I am getting the following message which will not let me continue with installation. I have seen solutions for other operating systems but not for Mac. I am inexperienced with Mac. Any help appreciated. Thanks!
I resolved it..
chmod 777 /Applications/XAMPP/xamppfiles/htdocs/testlink-1.9.16/gui/templates_c
sudo mkdir /var/testlink/logs/
sudo mkdir /var/testlink/upload_area/
Then give the last two directories writeable permissions:
sudo chmod 777 /var/testlink/logs/
sudo chmod 777 /var/testlink/upload_area/
Check whether the /var/www/html/testlink/gui/templates_c directory is writable (logged with the user used to run the webserver process).
To resolve this issue try to follow steps:
ssh into the machine you are installing
move to the testlink main directory, in my case: cd /var/www/html/testlink/gui
change the permision of templates_c: sudo chmod a+w templates_c
Now try to install testlink again.
I have installed Cloud Foundry CLI package on my Mac OS X Yosemite. From the terminal interface when I type cf command, I get the following error
FAILED
Error read/writing config: open /Users/viyer/.cf/config.json: permission denied
How do I fix this? I can't find the file config.json.
I found that removing the .cf directory then running the cf cli fixed it
sudo rm -r ~/.cf
cf -h
That was a bit weird, but I solved it by assigning 777 permission to the folder and config.json.
So, sudo chmod 777 .cf/config.json resolved the problem in my case.
Give it a try!
Cheers!
By default, the cf CLI will try to create and write to a directory named .cf in the user's home directory (i.e. ~/.cf). For some reason the user on your machine doesn't have permissions to create and/or write to that directory.
You can work around this problem by setting the CF_HOME environment variable to another directory that the user does have permissions in.
Unfortunately, no amount of changing permissions on my El Capitan would enable cf to access the config.json file in the .cf folder. I created a new folder in my home space ("CLI") and ensured it had the right permissions and set CF_HOME to point to "~/CLI/" . Just creating the new CF_HOME folder and setting CF_HOME in my .bash.profile was insufficient. I then copied the contents of the .cf folder into my new CLI folder. Finally! cf is working!
Oh, this is interesting. CF on this version of OSX will only run from the home directory, it won't run (it won't find config.json) from anything other than root.
Try this command: sudo chmod -R 777 /Users/{username}/.cf
It worked for me on OS X El Capitan.
The config.json need to have read and write permissions, in my case the .cf folder has root as owner and staff as group, my user on my Mac Yosemite is part of the group staff, but still the config.json file has permission set to 600
to fix this problem you should do:
sudo chmod 666 /User/YourUser/.cf/config.json
Also check the permissions of the .cf folder and check if you can read and write. Do something like this: sudo chmod 755 /User/YourUser/.cf
Delete all the .cf folders from your system and try again. This is something which #broomyocymru has already mentioned above. But still felt this might help users who might not be familiar with shell commands
I've installed homebrew, and am trying to change the write permissisons for the /usr/local/include directory.
When I run 'brew doctor', I get this error message:
Error: The /usr/local directory is not writable. Even if this
directory was writable when you installed Homebrew, other software may
change permissions on this directory. Some versions of the "InstantOn"
component of Airfoil are known to do this.
You should probably change the ownership and permissions of /usr/local
back to your user account.
I tried doing that with chown, but I'm pretty new at this and don't think I was running it correctly. I ran:
chown myusername /usr/local/include
I didn't get any error message, but when I run brew doctor it says I still lack permission to write to /usr/local/include.
Any help would be greatly appreciated!
Edit:
I'm getting an "operation not permitted" error.
cd /usr
chown myusername local
chown: local: Operation not permitted
Simple solution that worked for me:
click on your background to go to finder
click on go and go to folder /usr
right click on local and do get info
unlock the lock at the bottom
click + sign and add your user to the list and give read/write privileges
click on the gear sign at the bottom and choose apply to enclosed items to recurse under that directory and assign privileges too all directories beneath it.
type brew doctor from command prompt to test. My result:
Your system is ready to brew.
On my system, /usr/local is owned by root:admin and is rwxrwxr-x. My user is a member of the admin group, thus has write permissions. I haven't messed with ownership and permissions there, and my Homebrew installation is not complaining, so I assume my setup fits its requirements.
Check the ownership of your /usr/local; if it is owned by group admin, check if your non-adminsitrator account is a member of that group.
You should use: sudo chown username folder
Be careful with the change of ownership
Do not try to change ownership for /usr/ or recursively for /usr/local/
if you are not getting the same error posted in the original question.
You could screw up your system or weakness its security.
Some users can receive with homebrew permission errors that could be solved without changing the ownership of the whole /usr/ or /usr/local/ directories.
According to my experience, in most cases, it is just enough to restore the ownership for /usr/local/Cellar:
sudo chown -R "$USER" /usr/local/Cellar/
Alternatively, if you have a not standard installation
sudo chown -R "$USER" "$(brew --prefix)/Cellar"
You can try use command ls -l. With this command you will see list of files in current directory with some useful information, like who is owner of this file. So you will see if chown worked out. I believe that chown is a right command for changing ownership.
Exactly this problem has just started occuring on my MacBook.
The owner of /usr/local is:
drwxr-xr-x 24 root wheel 768 Apr 9 17:25 local
I am unable to change the permissions and add myself via Finder - I get a "you don't have the necessary permission" error.
Is this maybe due to security changes in mac os? (I have 10.13.6)