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/
Related
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 have cloned my project from the git.before that it was working fine now when i am running the project in Xcode then getting error:
Script-304B58A110DAC018002A0835.sh: line 2: cordova/lib/copy-www-build-step.sh: Permission denied, how to solve that issue .i am using mac
Give full permission to that folder
open terminal
go to the parent folder
then type
sudo chmnod -R 777 folder_name
OR
try
cd platforms/ios/cordova/lib
sudo chmod +x copy-www-build-step.sh
OR
cd platforms/ios/cordova/lib
sudo chmod 777 copy-www-build-step.sh
I'm using CocoaPods with a project. I ran pod install and it installed correctly. Then when I try to open the created xcworkspace Xcode displaying the error 'workspace file is locked'. I tried to unlock it but it's not working. It also didn't include some frameworks (Security.framework, MobileCoreServices.framework etc.) in workspace.
I had this problem recently. I don't know about the missing frameworks, but if you go to your project folder within terminal and modify the permissions on the project files, you should be able to open the project. I personally had to modify multiple files and folders to be able to get it to stop asking me if I want to unlock my files.
Steps that Worked for Me:
Use the terminal to go to the folder that contains the xcworkspace file. Type
sudo chmod 777 NameOfYourWorkspaceFile.xcworkspace
(Please don't literally use that file name unless that's what your xcworkspace file is called). This should change the permissions for your entire workspace, but you will still have the unlock problem with your Pods project.
From within the same directory, you can do another chmod on the Pods folder like so:
sudo chmod 777 Pods
After that, go into your Pods folder by typing "cd Pods" and then modify the permissions on your Pods.xcodeproj file as so:
sudo chmod 777 Pods.xcodeproj
Like I said previously, these permission changes were enough to get xCode to stop asking me if I want to unlock my projects. I don't know if it will be enough for you though. Hopefully it helps!
I had the same 'locked workspace' problem.
The root of my problem was that I was running sudo pod install instead of pod install.
If I ran pod install I got:
[!] Pod::Executable pull
error: cannot open .git/FETCH_HEAD: Permission denied
The problem is that running sudo pod install, the root is creating the .xcworkspace and when you open it with your user, it says that the project is locked.
What I did was change the permissions to be able to run pod install by doing:
sudo chown -R $USER ~/Library/Caches/CocoaPods
sudo chown -R $USER ~/.cocoapods
Changing these permissions, the command pod install should work and the generated .xcworkspace should not be locked.
I hope this helps someone!
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)