“Permission Denied” using cygwin in Windows

前端 未结 9 1481
终归单人心
终归单人心 2021-02-01 23:19

Background: I am trying to write a [.bat] file so I can double click it and a bash script will get invoked. The bash script will start up a few window

相关标签:
9条回答
  • 2021-02-01 23:58

    I think you have to change the directory or file permission. If you want to change permission of a file or directory then you have to add full path with the code.

    As if you want to change permission on cocos2d-x folder on C:\yourDirectory (I'm on Windows; on Mac it would be / instead of \) write the code on cygwin console:

    chmod -R 775 /cygwindrive/c/yourDirectory
    

    Note: If it's in C: drive you have to run it as administrator.

    0 讨论(0)
  • 2021-02-02 00:06

    git bash, run command like this: cmd "/C postgresql-10.5-2-windows-x64.exe --unattendedmodeui minimal --mode unattended --servicename 'postgreSQL'"

    0 讨论(0)
  • 2021-02-02 00:08

    As a Developer, I use a shortcut to provide a command-line interface (CLI) that behaves similar to Linux, in my Windows environment, and ran into the same issue trying to untar a file.

    The fix was to set the shortcut to "Run as Administrator".

    If you are using this method to access your Cygwin environment, go to the properties of the shortcut, select the Advanced button to get the options to "Run as Administrator", check the box, click Ok. And off you go!! You can also set your batch file to do this, by making a shortcut to it and doing the above.

    Hope that helps!

    0 讨论(0)
提交回复
热议问题