Marking file as executable on OSX using C (Carbon, standard C/C++)
-
06-09-2019 - |
Question
I'm looking for a way to programatically set the 'executable' bit on a file on OS X. I don't want to invoke 'chmod a+x' but I want the same effect as the chmod call. Any suggestions? A carbon API or any other C/C++ function would work...
Solution
See chmod(2), e.g. http://www.manpagez.com/man/2/chmod/osx-10.4.php (I think it's unchanged in 10.5).
OTHER TIPS
There is a "chmod" C library call. Go to a terminal window and type "man 2 chmod".
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow