{"record":{"id":"221d5a7865303b9c","repo":"SeleniumHQ/selenium","slug":"not-executable-path-inspect","errorCode":null,"errorMessage":"not executable: #{path.inspect}","messagePattern":"not executable: #(.+?)","errorType":"exception","errorClass":"Error::WebDriverError","httpStatus":null,"severity":"error","filePath":"rb/lib/selenium/webdriver/common/platform.rb","lineNumber":144,"sourceCode":"        path.tr(File::SEPARATOR, File::ALT_SEPARATOR)\n      end\n\n      def make_writable(file)\n        File.chmod 0o766, file\n      end\n\n      def assert_file(path)\n        return if File.file? path\n\n        raise Error::WebDriverError, \"not a file: #{path.inspect}\"\n      end\n\n      def assert_executable(path)\n        assert_file(path)\n\n        return if File.executable? path\n\n        raise Error::WebDriverError, \"not executable: #{path.inspect}\"\n      end\n\n      def exit_hook\n        pid = Process.pid\n\n        at_exit { yield if Process.pid == pid }\n      end\n\n      def localhost\n        info = Socket.getaddrinfo 'localhost', 80, Socket::AF_INET, Socket::SOCK_STREAM\n\n        return info[0][3] unless info.empty?\n\n        raise Error::WebDriverError, \"unable to translate 'localhost' for TCP + IPv4\"\n      end\n\n      def ip\n        orig = Socket.do_not_reverse_lookup","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/SeleniumHQ/selenium/blob/aa36b38e696a0909e973bdf5e2f9031ffe842c4b/rb/lib/selenium/webdriver/common/platform.rb#L126-L162","documentation":"assert_executable first calls assert_file, then checks the executable permission bit. If the file exists but is not executable, it raises WebDriverError. This validates driver binaries (e.g. chromedriver) before Selenium tries to launch them.","triggerScenarios":"A driver binary was downloaded but never made executable. The file is owned by another user without execute permission. Running on a system that strips the execute bit (some unzip/extract tools).","commonSituations":"Freshly downloaded driver on Linux/macOS without chmod +x. CI image that copied the binary without preserving permissions. Permissions reset after a git checkout.","solutions":["Make the binary executable: chmod +x /path/to/chromedriver.","Re-download/extract the driver with a tool that preserves the execute bit.","Verify with File.executable?(path) before configuring the driver path."],"exampleFix":"# before\n# chromedriver downloaded without execute permission\n\n# after\nchmod +x /usr/local/bin/chromedriver","handlingStrategy":"validation","validationCode":"File.chmod(0o755, path) unless File.executable?(path)","typeGuard":"def executable?(path)\n  File.file?(path) && File.executable?(path)\nend","tryCatchPattern":"begin\n  Selenium::WebDriver.for(:chrome)\nrescue Selenium::WebDriver::Error::WebDriverError => e\n  raise unless e.message.include?('not executable')\n  File.chmod(0o755, path)\n  Selenium::WebDriver.for(:chrome)\nend","preventionTips":["Run chmod +x on downloaded driver binaries immediately after extraction.","Use extraction tools that preserve the execute bit.","Verify File.executable?(path) during environment setup."],"tags":["ruby","platform","driver-path","permissions","filesystem"],"backgroundTag":null,"analyzedSha":"aa36b38e696a0909e973bdf5e2f9031ffe842c4b","analyzedAt":"2026-08-14T02:32:32.244Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}