opengeos / whiteboxR

WhiteboxTools R Frontend
https://whiteboxR.gishub.org
Other
172 stars 30 forks source link

`wbt_launch_wb_runner()` / `wbt_install_wb_extension()` plugins fail to execute: permission denied #102

Closed brownag closed 1 year ago

brownag commented 1 year ago

I noticed that two new open core utilities fail to execute when called via R system() or using the command generated by R function in terminal.

I investigated whether chmod to add/modify permissions to plugins or the whitebox_runner EXE would resolve the issue--in my first few tests this did not appear to resolve the problem.

library(whitebox)
wbt_launch_wb_runner()
#> thread 'main' panicked at 'failed to execute process: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', whitebox-tools-app/src/tools/mod.rs:1270:26
#> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

#> Error running WhiteboxTools (LaunchWbRunner)
#>   whitebox.exe_path: '/home/andrew/.local/share/R/whitebox/WBT/whitebox_tools'; File exists? TRUE
#>   Arguments: --run=LaunchWbRunner  -v

#> System command had status 101
#> launch_wb_runner - Elapsed Time: NA [did not run]

wbt_install_wb_extension()
#> thread 'main' panicked at 'failed to execute process: Os { code: 13, kind: PermissionDenied, message: "Permission denied" }', whitebox-tools-app/src/tools/mod.rs:1270:26
#> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
#> 
#> Error running WhiteboxTools (InstallWbExtension)
#>   whitebox.exe_path: '/home/andrew/.local/share/R/whitebox/WBT/whitebox_tools'; File exists? TRUE
#>   Arguments: --run=InstallWbExtension  --install_extension=General Toolset Extension -v
#> 
#> System command had status 101
#> install_wb_extension - Elapsed Time: NA [did not run]

Other plugins in the General Toolset Extension appear to run as expected, whereas the following occurs for LaunchWbRunner and InstallWbExtension.

Equivalent shell commands also fail with same error:

'/home/andrew/.local/share/R/whitebox/WBT/whitebox_tools' --run=LaunchWbRunner  -v
'/home/andrew/.local/share/R/whitebox/WBT/whitebox_tools' --run=InstallWbExtension  --install_extension=General Toolset Extension -v