> For the complete documentation index, see [llms.txt](https://olexsyn.gitbook.io/enote/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://olexsyn.gitbook.io/enote/linux/apache/errors/skript-ne-pracyuye.md).

# Скрипт не працює

## Forbidden

:exclamation: Якщо щось не працює - спершу перевір дозволи на директорії і файли

**Директорії** мають бути з дозволом `775`, **файли** - `664`.

**Скрипти,** як, власне, і директорії зі скриптами- `755`. (Інколи допускається `775` для директорій).

```bash
find ./lib -type d -exec chmod 775 {} \;
find ./lib -type f -exec chmod 664 {} \;

chmod 755 cgi-bin
find ./lib -type f -exec chmod 755 {} \;
```

:exclamation: Можуть конфліктувати налаштування в .htaccess

```apacheconf
DirectoryIndex index.htm
# DirectoryIndex index.html <- !!!

AddHandler server-parsed .htm
```

:exclamation: Якщо в директорії виконуються скрипти:

```apacheconf
DirectoryIndex index.htm
# DirectoryIndex index.html <- !!!

AddHandler server-parsed .htm
```

## Internal Server Error

:exclamation: Файл створений shell-скриптом (user:user) і файл створений cgi-скриптом (user:www-data), зазвичай, мають різних власників  і не можут бути перезаписані скриптом іншого типу.

:exclamation: Можливо в проекті є файли, які не викладаються на github, а тому не потрапили у проект при клонуванні (списки ip-адрес, зразки сигнатур, печатки)

:exclamation: Причиною проблем також можуть бути неправильні шляхи в скриптах, або невірні посилання на інтерпритатор в перших рядках скрипта

:exclamation: В моїх скриптах - може не доданий мовний розділ скрипта в файл .lng


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://olexsyn.gitbook.io/enote/linux/apache/errors/skript-ne-pracyuye.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
