From 76877bec015e18a794d8a1d4780073c4bc4663a2 Mon Sep 17 00:00:00 2001 From: mirivlad Date: Wed, 25 Feb 2026 15:16:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=BE=D1=82=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20security=20hardening=20=D0=B2=20systemd=20?= =?UTF-8?q?=D1=81=D0=B5=D1=80=D0=B2=D0=B8=D1=81=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Убрать ProtectSystem, ProtectHome, ReadWritePaths - Для личного бота ограничения не нужны, только создают проблемы - Бот работает от имени пользователя и должен иметь полный доступ Co-authored-by: Qwen-Coder --- install-systemd-service.sh | 7 ------- telegram-bot.service | 7 ------- 2 files changed, 14 deletions(-) diff --git a/install-systemd-service.sh b/install-systemd-service.sh index f590bbb..d64cbce 100755 --- a/install-systemd-service.sh +++ b/install-systemd-service.sh @@ -73,13 +73,6 @@ StandardOutput=journal StandardError=journal SyslogIdentifier=telegram-bot -# Security hardening с исключениями для работы бота -NoNewPrivileges=true -ProtectSystem=strict -ProtectHome=read-only -PrivateTmp=true -ReadWritePaths=$BOT_DIR $NVM_DIR /home/$BOT_USER/.cache - [Install] WantedBy=multi-user.target EOF diff --git a/telegram-bot.service b/telegram-bot.service index 4226aaa..a030eaa 100644 --- a/telegram-bot.service +++ b/telegram-bot.service @@ -16,12 +16,5 @@ StandardOutput=journal StandardError=journal SyslogIdentifier=telegram-bot -# Security hardening с исключениями для работы бота -NoNewPrivileges=true -ProtectSystem=strict -ProtectHome=read-only -PrivateTmp=true -ReadWritePaths=%WORKDIR% %HOME%/.npm-global %HOME%/.nvm %HOME%/.config/nvm %HOME%/.cache - [Install] WantedBy=multi-user.target