MacでDBFluteのアップグレード途中にpublic.propertiesの読み込みで Operation not permittedとなった場合の対処法

# 再現した環境

- Mac OS Catalina
- 以下バージョンは直接本現象に関係ありませんが、再現メモのため明記しておきます。件名の通りDBFluteを利用しており、バージョンアップしたのが本問題の肝です
    - DBFlute 1.2.0
    - OpenJDK 8
    - MySQL 5.7

# 現象

DBFluteのアップグレード途中にpublic.propertiesの読み込みで `Operation not permitted` が発生しました。

ブラウザで `public.properties` に直接アクセスすると読み込めるため、ネットワークの問題ではありません。

## 詳しいログ

```
  ykmaclocal in ~/IdeaProjects/dbflute-example-on-springboot/dbflute_maihamadb
±  |feature/upgrade-202008 U:2 ✗| → sh manage.sh 
     |\  |-\ |-- |      |      
     | | |-\ |-  | | | -+- /_\ 
     |/  |-/ |   | |_|  |  \-  

 <<< DB Change >>> *delete database
   0 : replace-schema  => drop tables and create schema
   1 : renewal         => call 0->21->22->23->25->24
   7 : save-previous  8 : alter-check

 <<< Generate >>>
   2 : regenerate  => call 21->22->23->25->24
  21 : jdbc        22 : doc  23 : generate
  24 : sql2entity  25 : outside-sql-test

 <<< Utility >>>
   4 : load-data-reverse  5 : schema-sync-check
  11 : refresh  12 : freegen  13 : take-assert
  88 : intro    94 : upgrade  97 : help

(input on your console)
What is your favorite task? (number):
94
/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
...Calling the DBFlute Upgrade task
nnnnnnnnnn/
Buildfile: ../mydbflute/dbflute-1.x/build-torque.xml

upgrade:
[df-upgrade] 2020-08-11 14:42:10,536 INFO  - +------------------------------------------+
[df-upgrade] 2020-08-11 14:42:10,538 INFO  - |                                          |
[df-upgrade] 2020-08-11 14:42:10,538 INFO  - |                 Upgrade                  |
[df-upgrade] 2020-08-11 14:42:10,539 INFO  - |                                          |
[df-upgrade] 2020-08-11 14:42:10,539 INFO  - +------------------------------------------+
[df-upgrade] 2020-08-11 14:42:10,563 INFO  - ...Loading http://dbflute.org/meta/public.properties
[df-upgrade] 2020-08-11 14:44:10,949 ERROR - Look! Read the message below.
[df-upgrade] /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[df-upgrade] Failed to execute DBFlute Task 'df-upgrade'.
[df-upgrade] 
[df-upgrade] [Advice]
[df-upgrade] Check the exception messages and the stack traces.
[df-upgrade] * * * * * * * * * */
[df-upgrade] java.lang.IllegalStateException: The url threw the IO exception: url=http://dbflute.org/meta/public.properties
[df-upgrade]    at org.dbflute.infra.dfprop.DfPublicProperties.load(DfPublicProperties.java:74)
[df-upgrade]    at org.dbflute.task.bs.DfAbstractTask.preparePublicProperties(DfAbstractTask.java:281)
[df-upgrade]    at org.dbflute.task.manage.DfUpgradeTask.doExecute(DfUpgradeTask.java:77)
[df-upgrade]    at org.dbflute.task.bs.DfAbstractTask$1.callActualExecute(DfAbstractTask.java:113)
[df-upgrade]    at org.dbflute.task.bs.assistant.DfTaskBasicController.doExecute(DfTaskBasicController.java:192)
[df-upgrade]    at org.dbflute.task.bs.assistant.DfTaskBasicController.execute(DfTaskBasicController.java:78)
[df-upgrade]    at org.dbflute.task.bs.DfAbstractTask.execute(DfAbstractTask.java:135)
[df-upgrade]    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[df-upgrade]    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
[df-upgrade]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[df-upgrade]    at java.lang.reflect.Method.invoke(Method.java:498)
[df-upgrade]    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
[df-upgrade]    at org.apache.tools.ant.Task.perform(Task.java:348)
[df-upgrade]    at org.apache.tools.ant.Target.execute(Target.java:357)
[df-upgrade]    at org.apache.tools.ant.Target.performTasks(Target.java:385)
[df-upgrade]    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[df-upgrade]    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[df-upgrade]    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[df-upgrade]    at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[df-upgrade]    at org.apache.tools.ant.Main.runBuild(Main.java:698)
[df-upgrade]    at org.apache.tools.ant.Main.startAnt(Main.java:199)
[df-upgrade]    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
[df-upgrade]    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
[df-upgrade] Caused by: java.net.SocketException: Operation not permitted (connect failed)
[df-upgrade]    at java.net.PlainSocketImpl.socketConnect(Native Method)
[df-upgrade]    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
[df-upgrade]    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
[df-upgrade]    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
[df-upgrade]    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[df-upgrade]    at java.net.Socket.connect(Socket.java:589)
[df-upgrade]    at java.net.Socket.connect(Socket.java:538)
[df-upgrade]    at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
[df-upgrade]    at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
[df-upgrade]    at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
[df-upgrade]    at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
[df-upgrade]    at sun.net.www.http.HttpClient.New(HttpClient.java:339)
[df-upgrade]    at sun.net.www.http.HttpClient.New(HttpClient.java:357)
[df-upgrade]    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
[df-upgrade]    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
[df-upgrade]    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
[df-upgrade]    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
[df-upgrade]    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
[df-upgrade]    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
[df-upgrade]    at java.net.URL.openStream(URL.java:1045)
[df-upgrade]    at org.dbflute.infra.dfprop.DfPublicProperties.load(DfPublicProperties.java:68)
[df-upgrade]    ... 22 more
[df-upgrade] 2020-08-11 14:44:10,966 INFO  - 
[df-upgrade] _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
[df-upgrade] [Final Message]: 02m00s422ms *Abort
[df-upgrade] 
[df-upgrade]   DBFLUTE_CLIENT: {maihamadb}
[df-upgrade]     database  = mysql
[df-upgrade]     language  = java
[df-upgrade]     container = spring
[df-upgrade]     package   = org.docksidestage.dbflute
[df-upgrade] 
[df-upgrade]   DBFLUTE_ENVIRONMENT_TYPE: {}
[df-upgrade]     driver = com.mysql.jdbc.Driver
[df-upgrade]     url    = jdbc:mysql://localhost:3306/maihamadb?useSSL=false
[df-upgrade]     schema = {maihamadb.$$NoNameSchema$$ as main}
[df-upgrade]     user   = maihamadb
[df-upgrade]     props  = {}
[df-upgrade]     additionalSchema = 
[df-upgrade]     repsEnvType      = ut
[df-upgrade]     refreshProject   = $$AutoDetect$$
[df-upgrade] 
[df-upgrade] 
[df-upgrade]   *you need to upgrade also DBFlute Runtime
[df-upgrade] 
[df-upgrade]     e.g. pom.xml:
[df-upgrade]      <dbflute.version>null</dbflute.version>
[df-upgrade] 
[df-upgrade] _/_/_/_/_/_/_/_/_/_/ {df-upgrade}

BUILD FAILED
/Users/yuko/IdeaProjects/dbflute-example-on-springboot/mydbflute/dbflute-1.x/build-torque.xml:272: org.dbflute.exception.DfDBFluteTaskFailureException: 
/* * * * * * * * * * * * * * * * * * * * * * * * *
Failed to execute the DBFlute task: df-upgrade
Look at the log: console or dbflute.log
* * * * * * * * * */

```

# 解決策

Mac OSのセキュリティ設定の問題でした。ターミナルからディスクへのアクセス権がなかったので下記を参考に設定しました。

https://hyzstudioblog.com/technology/4876/

## 解決後のログ
設定後は無事にDBFluteをバージョンアップできました。

```
  ykmaclocal in ~/IdeaProjects/dbflute-example-on-springboot/dbflute_maihamadb
±  |feature/upgrade-202008 U:2 ✗| → sh manage.sh 
     |\  |-\ |-- |      |      
     | | |-\ |-  | | | -+- /_\ 
     |/  |-/ |   | |_|  |  \-  

 <<< DB Change >>> *delete database
   0 : replace-schema  => drop tables and create schema
   1 : renewal         => call 0->21->22->23->25->24
   7 : save-previous  8 : alter-check

 <<< Generate >>>
   2 : regenerate  => call 21->22->23->25->24
  21 : jdbc        22 : doc  23 : generate
  24 : sql2entity  25 : outside-sql-test

 <<< Utility >>>
   4 : load-data-reverse  5 : schema-sync-check
  11 : refresh  12 : freegen  13 : take-assert
  88 : intro    94 : upgrade  97 : help

(input on your console)
What is your favorite task? (number):
94
/nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
...Calling the DBFlute Upgrade task
nnnnnnnnnn/
Buildfile: ../mydbflute/dbflute-1.x/build-torque.xml

upgrade:
[df-upgrade] 2020-08-11 14:50:15,604 INFO  - +------------------------------------------+
[df-upgrade] 2020-08-11 14:50:15,606 INFO  - |                                          |
[df-upgrade] 2020-08-11 14:50:15,606 INFO  - |                 Upgrade                  |
[df-upgrade] 2020-08-11 14:50:15,606 INFO  - |                                          |
[df-upgrade] 2020-08-11 14:50:15,606 INFO  - +------------------------------------------+
[df-upgrade] 2020-08-11 14:50:15,628 INFO  - ...Loading http://dbflute.org/meta/public.properties
[df-upgrade] 2020-08-11 14:50:16,218 INFO  - ...Downloading DBFlute Engine to ../mydbflute/dbflute-1.2.3.zip
[df-upgrade] 2020-08-11 14:50:16,219 INFO  -     from https://github.com/dbflute/dbflute-core/releases/download/dbflute-1.2.3/dbflute-1.2.3.zip
[df-upgrade] 2020-08-11 14:50:29,311 INFO  - ...Extracting zip archive to ../mydbflute/dbflute-1.2.3
[df-upgrade] 2020-08-11 14:50:29,675 INFO  - ...Deleting zip archive to ../mydbflute/dbflute-1.2.3.zip
[df-upgrade] 2020-08-11 14:50:29,677 INFO  - ...Replacing version script: ./_project.bat
[df-upgrade] 2020-08-11 14:50:29,678 INFO  - ...Replacing version script: ./_project.sh
[df-upgrade] 2020-08-11 14:50:29,686 INFO  - /===========================================================================
[df-upgrade] 2020-08-11 14:50:29,686 INFO  - ...Refreshing [dbflute-example-on-springboot] by http://localhost:8386/
[df-upgrade] 2020-08-11 14:50:29,688 INFO  - ...Retrying refreshing by default secondary URL http://localhost:8387/
[df-upgrade] 2020-08-11 14:50:29,690 INFO  - Look! Read the message below.
[df-upgrade] /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[df-upgrade] Failed to refresh the resources.
[df-upgrade] 
[df-upgrade] [Project List]
[df-upgrade] [dbflute-example-on-springboot]
[df-upgrade] 
[df-upgrade] [Request URL]
[df-upgrade] http://localhost:8386/
[df-upgrade] 
[df-upgrade] [IOExpception]
[df-upgrade] ConnectException
[df-upgrade] Connection refused (Connection refused)
[df-upgrade] * * * * * * * * * */
[df-upgrade] 2020-08-11 14:50:29,691 INFO  - ==========/
[df-upgrade] 2020-08-11 14:50:29,698 INFO  - 
[df-upgrade] _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
[df-upgrade] [Final Message]: 00m14s088ms
[df-upgrade] 
[df-upgrade]   DBFLUTE_CLIENT: {maihamadb}
[df-upgrade]     database  = mysql
[df-upgrade]     language  = java
[df-upgrade]     container = spring
[df-upgrade]     package   = org.docksidestage.dbflute
[df-upgrade] 
[df-upgrade]   DBFLUTE_ENVIRONMENT_TYPE: {}
[df-upgrade]     driver = com.mysql.jdbc.Driver
[df-upgrade]     url    = jdbc:mysql://localhost:3306/maihamadb?useSSL=false
[df-upgrade]     schema = {maihamadb.$$NoNameSchema$$ as main}
[df-upgrade]     user   = maihamadb
[df-upgrade]     props  = {}
[df-upgrade]     additionalSchema = 
[df-upgrade]     repsEnvType      = ut
[df-upgrade]     refreshProject   = $$AutoDetect$$
[df-upgrade] 
[df-upgrade] 
[df-upgrade]   *you need to upgrade also DBFlute Runtime
[df-upgrade] 
[df-upgrade]     e.g. pom.xml:
[df-upgrade]      <dbflute.version>1.2.3</dbflute.version>
[df-upgrade] 
[df-upgrade] _/_/_/_/_/_/_/_/_/_/ {df-upgrade}

BUILD SUCCESSFUL
Total time: 17 seconds
```