leavez / cocoapods-binary

integrate pods in form of prebuilt frameworks conveniently, reducing compile time
MIT License
1.31k stars 206 forks source link

Permission denied @ rb_sysopen after started using cocoapods-binary #161

Closed ajRiverav closed 2 years ago

ajRiverav commented 2 years ago

After adding the necessary :binary flags in the Podfile, I ran pod install. I got error Errno::EACCES - Permission denied @ rb_sysopen - <dir1>/Pods/<dir2>/<edited>.framework/<dir3>

The output of ls -la is

-rw-------  1 root  wheel  <someSize> <recent date> <dir1>/Pods/<dir2>/<edited>.framework/<dir3>

First observation: why is the file owner root? I decided to remove the Pods directory and run pod install again BUT ensure I did not have root privileges. I got the same error and same output for the ls command.

I decided to change file owner and permissions with sudo chown -R $USER <dir1>/Pods/<dir2>/<edited>.framework/<dir3> and run pod install again. That fixes the error (although I should not need to do this). Also, it's not practical as I got the same error but for a different directory. Note that if I remove cocoapods-binary (and its uses in the Podfile), I do not get this error.

Stack

   CocoaPods : 1.10.2
        Ruby : ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin20]
    RubyGems : 3.0.9
        Host : macOS 12.4 (21F79)
       Xcode : 13.2.1 (13C100)
         Git : git version 2.36.0
Ruby lib dir : /<edited>/.rvm/rubies/ruby-2.5.3/lib
Repositories : <edited>

Installation Source

Executable Path: /<edited>/.rvm/gems/ruby-2.5.3/bin/pod

Plugins

cocoapods-binary      : 0.4.4
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0
ajRiverav commented 2 years ago

moved to https://github.com/CocoaPods/CocoaPods/issues/new

ajRiverav commented 2 years ago

https://github.com/CocoaPods/CocoaPods/issues/11474

DmitrySemenyk commented 1 year ago

@ajRiverav could you explain how you fixed this issue ? have the same problem

Errno::EACCES: Permission denied @ rb_sysopen - /Users/dmitriy.semenyuk/Desktop/Work/demo-app/.mbuild/demo-app-ios/ide/xcode_project/Pods/Ads-Global/SDK/BUFoundation.framework/Versions/A/Headers/BUPersistence.h
/Users/dmitriy.semenyuk/.rvm/gems/ruby-3.0.2/gems/mbuild2-1.15.0/lib/mbuild/commands.rb:216:in `block in cp_smart'
/Users/dmitriy.semenyuk/.rvm/gems/ruby-3.0.2/gems/mbuild2-1.15.0/lib/mbuild/commands.rb:203:in `each'
/Users/dmitriy.semenyuk/.rvm/gems/ruby-3.0.2/gems/mbuild2-1.15.0/lib/mbuild/commands.rb:203:in `cp_smart'
/Users/dmitriy.semenyuk/.rvm/gems/ruby-3.0.2/gems/mbuild2-1.15.0/lib/mbuild.rb:297:in `block in new_top_level'
ajRiverav commented 1 year ago

I closed this issue in favor of https://github.com/CocoaPods/CocoaPods/issues/11474.