Xcode 10 build fail rm permission denied in /bin/sh/ - xcodebuild

I recently update my system to
Xcode: 10
OSX : Mojave 10.14
For few days my iOS development works fine, but suddenly start facing following issues.
dyld: Library not loaded: #rpath/Appsee.framework/Appsee
Referenced from: /Users/a.b.ak1b/Library/Developer/CoreSimulator/Devices/2223E5BD-215F-48D7-8649-2D63ECBAE2B6/data/Containers/Bundle/Application/59E09AD0-ADAB-4221-A334-70F71DC6AC0B/MyApp.app/MyApp
Reason: image not found
But this issue was fixed by changing Xcode->File->Workspace Setting->Build Setting->Legacy Build Setting
Then I getting permission denied error for rm command in one of shell script used while building the target.
Showing All Messages
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Common: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/USGlobals.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRKeepAliveData.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/AFSOAPClient.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRHubRegistrationData.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRHubProxy.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/CMSeatMapWingView.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRHubProxyInterface.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRLog.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/GrafanaClient.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/NSObject+SRJSON.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRHubConnectionInterface.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRHubInvocation.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/AFIncrementalStoreHTTPClient.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRHubConnection.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRLongPollingTransport.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/ApplicationBuildConfiguration.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/ServiceConfiguration.h: Permission denied
rm: /Users/a.b.ak1b/Documents/work/iOS-App-1/Library/Common/../Vendor/Common.framework/Versions/A/Headers/SRConnectionInterface.h: Permission denied
For the time-being I need to build the target using sudo xcodebuild. Not found any way to trigger build using xcode to avoid this error.

There are two different issues here:
Why shell script is throwing error?
This is because of MacOS Mojave privacy protection.
You need to give permission to XCode to have Full Disk Access. You can do this in System Preferences->Security&Privacy
XCode 10 uses a new build system.
Xcode 10 uses a new build system. The new build system provides
improved reliability and build performance, and it catches project
configuration problems that the legacy build system does not.
I am not sure why the error happened after few days but perhaps it has to do with changes in ALWAYS_SEARCH_USER_PATHS. I am not sure about this, but you can try adding Appsee.framework as an embedded binary in Target-> General-> Embedded Binaries

Related

phantomjs command - permission denied

Running a VM with vagrant and virtual box but when I try to run phantomjs I get permission denied error.
Tried to chmod 777 the executable but the permissions are still -rw-rw-rw
I am running the command:
/usr/share/nginx/html/vendor/bin/phantomjs
I get
bash: /usr/share/nginx/html/vendor/bin/phantomjs: Permission denied
Found the problem, it was the guest permissions for vagrant. Changed the permissions on the provision and now I can execute phantomjs.

Disinstall Vagrant Mac

I want to disinstall Vagrant and I'm following the documentation:
https://www.vagrantup.com/docs/installation/uninstallation.html
first command to run is :
rm -rf /opt/vagrant
but here comes the issue. I get the following:
...................................
rm: /opt/vagrant/embedded/share/readline/rlcat.c: Permission denied
rm: /opt/vagrant/embedded/share/readline/histexamp.c: Permission denied
rm: /opt/vagrant/embedded/share/readline: Permission denied
rm: /opt/vagrant/embedded/share: Permission denied
rm: /opt/vagrant/embedded: Permission denied
rm: /opt/vagrant: Permission denied
I get this message for all files in /opt/vagrant. I tried to use chmod to give me the right to write it but it doesn't work out.
How am I supposed to solve this ?

Gitosis clone error: Unable to read config file. Permission denied

I tried to clone a gitosis repository and got the error:
ERROR:gitosis.app:Unable to read config file: [Errno 13] Permission denied: '/sr
v/gitosis/.gitosis.conf'
fatal: The remote end hung up unexpectedly
The permission of gitosis.conf is set to 755. I also checked the folders and make sure that owner is gitosis. I cannot see anything wrong with permission. What could be the reason for this error?
Thanks. Yes, the repositories directory is not owned by gitosis. Cloned successfully after updating it.
"su - git" to git user and
cat the gitosis.conf file.
if you cannot see the content of the file.
then you need to fix the ownership and permmisson of file or
the path nodes along the path of the file.
Bill Z

Error while executing gem...Permission Denied

I am attempting to install taps from my Heroku app folder. When I type "gem install taps," I get the following error:
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24/bin/taps
I attempted to remove the taps-0.3.24 folder using rm -r and got this question: override rwxr-xr-x root/staff for /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24//bin/schema?
Upon typing yes, it tells me permission denied. Here is the whole exchange:
Jacob-MacBook-Pro:furious-ocean-6122012 jacob$ rm -r /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24/
override rwxr-xr-x root/staff for /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24//bin/schema? yes
rm: /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24//bin/schema: Permission denied
override rw-r--r-- root/staff for /Users/jacob/.rvm/gems/ruby-1.9.3-p194/gems/taps-0.3.24//bin/schema.cmd?
Any thoughts on how to resolve this issue would be appreciated. Thanks!
I just ran into this when trying to get the Heroku Toolbelt running. I was able to remove the old version with sudo rm -rf /path/to/gems/taps-x.x.x and then re-install (without sudo).
You should add "sudo" before "gem...."

cd'ing permissions denied after enabling root user on mac os x 10.6.4

I enabled root in terminal by sudo passwd root and then attempted to cd a rails site folder located on my desktop. I got the error -bash: cd: /Users/fred/Desktop/sitefolder: Permission denied
How to get rid of this error/ enable all permissions for root? Thanks
Are you sure you called cd as root?
If yes, check if the owner of the folder is root. If not call
sudo chown /Users/fred/Desktop/sitefolder root
then check if the owner has reading permission. If not call
chmod 744 /Users/fred/Desktop/sitefolder
(this enables all permissions for owner and only reading permission for group and others). If you don't care much about that folder you may instead call directly
sudo chmod 777 /Users/fred/Desktop/sitefolder
giving all permissions to every user.