背景: 我正在尝试编写[.bat]文件,因此我可以双击它,并调用bash脚本.bash脚本将启动一些Windows GUI应用程序来监控GPU/CPU温度.我刚刚安装了cygwin v1.7.7-1(今天下载)和windows 7.
代码: monitor-temps.bat:
C:\cygwin\bin\bash.exe ~/bin/monitor-temps.bash
pause
Run Code Online (Sandbox Code Playgroud)
代码: monitor-temps.bash:
#!/usr/bin/bash
"/cygdrive/c/Users/michael/Desktop/apps_and_drivers/GPU-Z.0.4.8.exe" &
Run Code Online (Sandbox Code Playgroud)
输出: 双击[.bat]文件后,我得到一个:
C:\Users\michael\Desktop>C:\cygwin\bin\bash.exe ~/bin/monitor-temps.bash
C:\Users\michael\Desktop>pause
Press any key to continue . . . /home/michael/bin/monitor-temps.bash: line 2: /cygdrive/c/Users/michael/Desktop/apps_and_drivers/GPU-Z.0.4.8.exe: Permission denied
Run Code Online (Sandbox Code Playgroud)
当我cd到目录并手动执行应用程序时,我仍然得到相同的权限错误.
权限: 根据我在Linux中的权限问题的经验,一切看起来都很好,因为我是我认为的用户,并且该文件具有预期的权限:
$ whoami
michael
$ ls -l GPU*
-rwx------+ 1 michael None 890720 2010-12-01 19:23 GPU-Z.0.4.8.exe
Run Code Online (Sandbox Code Playgroud)
问题: 有谁知道如何解决这个问题?我错过了什么吗?