Search code examples
ccygwinfile-permissions

cygwin "Permission denied"


Trying to launch a file

./cu/cu-check-regressions --help

Get this:

-bash: ./cu/cu-check-regressions: /usr/bin/python: bad interpreter: Permission denied

Already changed permission in properties>security my account has full control over the folder. Tried running cygwin as Administrator did not work as well. Googled the issue for the past two hours.


Solution

  • The error message indicates that /usr/bin/python, the Python interpreter, is not executable.

    Run

    ls -l /usr/bin/python
    

    or

    ls -l /usr/bin/python.exe
    

    to confirm this.

    Running

    chmod +x /usr/bin/python
    

    is likely to fix the immediate problem. But the question remains: Why is /usr/bin/python not executable? Execution permission is set when it's installed. Have you been messing around with the /usr/bin directory? Its contents are managed by Cygwin; there should rarely be any need to touch it.

    Based on your comment, it seems likely that Python just isn't installed (though that's not the error message I'd expect in that case). As I recall, Cygwin doesn't install Python by default. Re-run the installation command (setup-x86.exe or setup-x86_64.exe, depending on which one you're using) and install (or reinstall) the python package; I think it's under "Interpreters".