duanruanxian5028 2016-03-27 15:40
浏览 51

在PHP中使用shell_exec geogig init时权限被拒绝

Well, GeoGig it's a new tool for versioning geodata, it has the same funcionality as git has. I'm implementing this new tool but I'm facing a problem when I use the shell_exec("geogig init"). I've setted the PATH variable in apache, which points to /opt/geogig/bin, where are the binaries files of geogig, with this I can use the command line geogig inside my php. My problem is that this command create a certain part of the local repository, but gets an error which shell_exec throws:

12:15:33.678 [main] ERROR o.locationtech.geogig.cli.GeogigCLI - An unhandled error occurred: java.io.IOException: Permission denied. See the log for more details.
org.locationtech.geogig.storage.ConfigException: java.io.IOException: Permission denied
    at org.locationtech.geogig.storage.fs.IniFileConfigDatabase$2.iniFile(IniFileConfigDatabase.java:63) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.fs.INIFile.checkReload(INIFile.java:330) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.fs.INIFile.get(INIFile.java:56) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.fs.IniFileConfigDatabase.getGlobal(IniFileConfigDatabase.java:100) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.bdbje.JEObjectDatabase.newTransaction(JEObjectDatabase.java:878) ~[geogig-bdbje-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.bdbje.JEObjectDatabase.putInternal(JEObjectDatabase.java:630) ~[geogig-bdbje-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.AbstractObjectStore.put(AbstractObjectStore.java:224) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.ForwardingObjectDatabase.put(ForwardingObjectDatabase.java:127) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.di.ObjectDatabasePutInterceptor$GraphUpdatingObjectDatabase.put(ObjectDatabasePutInterceptor.java:65) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.storage.ForwardingObjectDatabase.put(ForwardingObjectDatabase.java:127) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.api.porcelain.InitOp.callInternal(InitOp.java:216) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.api.porcelain.InitOp._call(InitOp.java:125) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.api.porcelain.InitOp._call(InitOp.java:64) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.api.AbstractGeoGigOp.call(AbstractGeoGigOp.java:133) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.cli.porcelain.Init.runInternal(Init.java:99) ~[geogig-cli-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.cli.AbstractCommand.run(AbstractCommand.java:68) ~[geogig-cli-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.cli.GeogigCLI.executeInternal(GeogigCLI.java:543) [geogig-cli-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.cli.GeogigCLI.execute(GeogigCLI.java:385) [geogig-cli-1.0-RC1a.jar:1.0-RC1a]
    at org.locationtech.geogig.cli.GeogigCLI.main(GeogigCLI.java:340) [geogig-cli-1.0-RC1a.jar:1.0-RC1a]
Caused by: java.io.IOException: Permission denied
    at java.io.UnixFileSystem.createFileExclusively(Native Method) ~[na:1.8.0_74]
    at java.io.File.createNewFile(File.java:1012) ~[na:1.8.0_74]
    at org.locationtech.geogig.storage.fs.IniFileConfigDatabase$2.iniFile(IniFileConfigDatabase.java:61) ~[geogig-core-1.0-RC1a.jar:1.0-RC1a]
    ... 18 common frames omitted
An unhandled error occurred: java.io.IOException: Permission denied. See the log for more details.

Anyone have an idea? thanks

  • 写回答

2条回答 默认 最新

  • drqwbh2150 2016-03-27 15:44
    关注

    There is some file that GeoGig is trying to read or write that the user PHP is running as doesn't have permission to read or write. I would suggest you do as the error message says and "See the log for more details." to find out what that file is.

    评论

报告相同问题?

悬赏问题

  • ¥15 nrf52810-c三个a 程序
  • ¥15 lego-loam跑出来的roll误差很大
  • ¥50 求一个半透明没有锯齿的圆角窗体的实现例子
  • ¥15 STM32cubeMX里的FreeRTOS无法释放内存
  • ¥15 CATIA有些零件打开直接单机确定终止
  • ¥15 请问有会的吗,用MATLAB做
  • ¥15 phython如何实现以下功能?查找同一用户名的消费金额合并—
  • ¥15 孟德尔随机化怎样画共定位分析图
  • ¥18 模拟电路问题解答有偿速度
  • ¥15 CST仿真别人的模型结果仿真结果S参数完全不对