fix: отключить security hardening в systemd сервисе

- Убрать ProtectSystem, ProtectHome, ReadWritePaths
- Для личного бота ограничения не нужны, только создают проблемы
- Бот работает от имени пользователя и должен иметь полный доступ

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
mirivlad 2026-02-25 15:16:57 +08:00
parent 359f6a66c1
commit 76877bec01
2 changed files with 0 additions and 14 deletions

View File

@ -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

View File

@ -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