[GH-ISSUE #10825] Domain Monitor script creates crontab task to run as root, should be www-data #2327

Closed
opened 2026-02-26 12:52:04 +03:00 by kerem · 1 comment
Owner

Originally created by @fribse on GitHub (Jan 15, 2026).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/10825

Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

📜 What is the name of the script you are using?

domain-monitor.sh

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/domain-monitor.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

📈 Which Proxmox version are you on?

9.1.2

📝 Provide a clear and concise description of the issue.

The install works nicely, it creates everything, but you have to change the user the crontab task is run as www-data otherwise the app will not be able to process the log, and will not let you log in.

0 0 * * * root /usr/bin/php /opt/domain-monitor/cron/check_domains.php
should be
0 0 * * * www-data /usr/bin/php /opt/domain-monitor/cron/check_domains.php

🔄 Steps to reproduce the issue.

  1. Install it with the script
  2. Edit the /etc/crontab to activate the scheduled script
  3. Wait until the script has run.
  4. Login

Fail

Paste the full error output (if available).

=== DOMAIN MONITOR ERROR REPORT ===

ERROR INFORMATION:

  • Error ID: 45DA2852BCB8
  • Type: ErrorException
  • Message: file_put_contents(/opt/domain-monitor/app/Services/../../logs/app_2026-01-15.log): Failed to open stream: Permission denied

LOCATION:

  • File: /opt/domain-monitor/app/Services/Logger.php
  • Line: 39

REQUEST DETAILS:

  • Method: POST
  • URI: /login
  • Timestamp: 2026-01-15 11:10:03

USER CONTEXT:

  • User: Guest (Not logged in)
  • IP Address: 86.58.159.10
  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0

SYSTEM INFORMATION:

  • PHP Version: 8.4.15
  • Memory Usage: 2MB
  • Peak Memory: 2MB

STACK TRACE:
#0 App\Services\ErrorHandler->handleError()
#1 /opt/domain-monitor/app/Services/Logger.php(39): file_put_contents()
#2 /opt/domain-monitor/app/Services/Logger.php(55): App\Services\Logger->log()
#3 /opt/domain-monitor/app/Controllers/AuthController.php(120): App\Services\Logger->info()
#4 App\Controllers\AuthController->login()
#5 /opt/domain-monitor/core/Router.php(72): call_user_func()
#6 /opt/domain-monitor/core/Application.php(43): Core\Router->resolve()
#7 /opt/domain-monitor/public/index.php(119): Core\Application->run()

=== END OF ERROR REPORT ===

Reference ID: 45DA2852BCB8
Please include this report when reporting bugs.

🖼️ Additional context (optional).

This also goes for the update script, so if you use update, it will recreate the crontab entry with root as user.

Originally created by @fribse on GitHub (Jan 15, 2026). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/10825 ### ✅ Have you read and understood the above guidelines? yes ### 🔎 Did you run the script with verbose mode enabled? Yes, verbose mode was enabled and the output is included below ### 📜 What is the name of the script you are using? domain-monitor.sh ### 📂 What was the exact command used to execute the script? bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/domain-monitor.sh)" ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 13 ### 📈 Which Proxmox version are you on? 9.1.2 ### 📝 Provide a clear and concise description of the issue. The install works nicely, it creates everything, but you have to change the user the crontab task is run as www-data otherwise the app will not be able to process the log, and will not let you log in. 0 0 * * * root /usr/bin/php /opt/domain-monitor/cron/check_domains.php should be 0 0 * * * www-data /usr/bin/php /opt/domain-monitor/cron/check_domains.php ### 🔄 Steps to reproduce the issue. 1. Install it with the script 2. Edit the /etc/crontab to activate the scheduled script 3. Wait until the script has run. 4. Login Fail ### ❌ Paste the full error output (if available). === DOMAIN MONITOR ERROR REPORT === ERROR INFORMATION: - Error ID: 45DA2852BCB8 - Type: ErrorException - Message: file_put_contents(/opt/domain-monitor/app/Services/../../logs/app_2026-01-15.log): Failed to open stream: Permission denied LOCATION: - File: /opt/domain-monitor/app/Services/Logger.php - Line: 39 REQUEST DETAILS: - Method: POST - URI: /login - Timestamp: 2026-01-15 11:10:03 USER CONTEXT: - User: Guest (Not logged in) - IP Address: 86.58.159.10 - User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0 SYSTEM INFORMATION: - PHP Version: 8.4.15 - Memory Usage: 2MB - Peak Memory: 2MB STACK TRACE: #0 App\Services\ErrorHandler->handleError() #1 /opt/domain-monitor/app/Services/Logger.php(39): file_put_contents() #2 /opt/domain-monitor/app/Services/Logger.php(55): App\Services\Logger->log() #3 /opt/domain-monitor/app/Controllers/AuthController.php(120): App\Services\Logger->info() #4 App\Controllers\AuthController->login() #5 /opt/domain-monitor/core/Router.php(72): call_user_func() #6 /opt/domain-monitor/core/Application.php(43): Core\Router->resolve() #7 /opt/domain-monitor/public/index.php(119): Core\Application->run() === END OF ERROR REPORT === Reference ID: 45DA2852BCB8 Please include this report when reporting bugs. ### 🖼️ Additional context (optional). This also goes for the update script, so if you use update, it will recreate the crontab entry with root as user.
kerem 2026-02-26 12:52:04 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@CrazyWolf13 commented on GitHub (Jan 16, 2026):

Thanks for your finding, I made a PR.

<!-- gh-comment-id:3758409770 --> @CrazyWolf13 commented on GitHub (Jan 16, 2026): Thanks for your finding, I made a PR.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#2327
No description provided.