Home > Blockchain >  MacOS cli program permission denied
MacOS cli program permission denied

Time:08-19

I'm currently experiencing a problem where I'm testing the HelloPhotogrametry command line app released by Apple. I keep on getting the zsh: permission denied notice. I chmod 777 everything in the folder but the issue still persists.

richardmac@RichardMacdeMacBook-Pro CreatingAPhotogrammetryCommandLineApp % ./HelloPhotogrammetry ./Aug\ 15,\ 2022\ at\ 8:52:59\ PM ./newfolder -d full -o sequential -f normal
zsh: permission denied: ./HelloPhotogrammetry

I typed ls -l, and all the files have rwx capabilities.

richardmac@RichardMacdeMacBook-Pro CreatingAPhotogrammetryCommandLineApp % ls -l
total 8
drwxrwxrwx@ 20 richardmac  staff  640  8 15 20:54 Aug 15, 2022 at 8:52:59 PM
drwxrwxrwx@  3 richardmac  staff   96 11  3  2021 Configuration
drwxrwxrwx@  6 richardmac  staff  192 11  3  2021 Data
drwxrwxrwx@  4 richardmac  staff  128  8 16 10:15 HelloPhotogrammetry
drwxrwxrwx@  6 richardmac  staff  192  8 16 09:22 HelloPhotogrammetry.xcodeproj
drwxrwxrwx@  4 richardmac  staff  128 11  3  2021 LICENSE
-rwxrwxrwx@  1 richardmac  staff  282 11  3  2021 README.md
drwxrwxrwx   2 richardmac  staff   64  8 15 21:41 newfolder

I check the documents folder, it has rwx capabilities as well.

total 0
drwx------   6 richardmac  staff   192  8 15 14:25 Desktop
drwxrwxrwx   7 richardmac  staff   224  8 15 21:41 Documents
drwx------  31 richardmac  staff   992  8 15 21:25 Downloads
drwx------@ 86 richardmac  staff  2752  8 15 15:35 Library
drwx------   6 richardmac  staff   192  8 13 03:22 Movies
drwx------   5 richardmac  staff   160  8 13 17:45 Music
drwx------   5 richardmac  staff   160  8 13 17:45 Pictures
drwxr-xr-x   4 richardmac  staff   128  8 12 20:42 Public
-rw-r--r--   1 richardmac  staff     0  8 13 02:04 brew_install

total 32
drwxrwxrwx@ 13 richardmac  staff    416  8 16 10:15 CreatingAPhotogrammetryCommandLineApp
drwxr-xr-x@ 10 richardmac  staff    320  8 15 10:25 GitHub

The program folder is located at /Users/richardmac/documents/CreatingAPhotogrammetryCommandLineApp

Any help is greatly appreciated.

CodePudding user response:

(Issue resolved with the assistance from Eskimo from Apple developer technical support. The solution is as follows:)

Cool.

When you build the tool in Xcode, it doesn’t place the executable on your path. Rather, the build results, including the built executable, ends up in ~/quinn/Library/Developer/Xcode/DerivedData/HelloPhotogrammetry-JJJ/Build/Products/Debug/HelloPhotogrammetry, where JJJ is some seemingly random string. If you just want to use the tool from Terminal, do this:

Build it in Xcode.

Choose Product > Show Build Folder in Finder.

In the resulting Finder window, navigate to Products > Debug.

Copy the HelloPhotogrammetry executable to somewhere convenient. For example, I have a ~/bin directory in my path, so I would copy the executable there.

  • Related