8000 Check on write access of config is incorrect · Issue #122 · liuch/dmarc-srg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Check on write access of config is incorrect #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
olaf7 opened this issue Apr 7, 2024 · 1 comment
Open

Check on write access of config is incorrect #122

olaf7 opened this issue Apr 7, 2024 · 1 comment

Comments

@olaf7
Copy link
olaf7 commented Apr 7, 2024
/usr/local/share/dmarc-srg# php utils/check_config.php 
=== GENERAL INFORMATION ===
  * OS information: Linux 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64
  * PHP version:    8.2.7

=== EXTENSIONS ===
  * pdo_mysql...................... Ok
  * xmlreader...................... Ok
  * zip............................ Ok
  * json........................... Ok

=== CONFIG FILE ===
  * Checking if the file exists.... Ok
  * Checking read permission....... Ok
  * Checking write permission...... Warning
    Message: The configuration file is writable
  * Checking access by other users. Ok
  * Checking the output buffer..... Ok

=== DATABASE ===
  * Accessibility check............ Ok
  * Checking for integrity......... Ok

=== MAILBOXES ===
  * Checking mailboxes config...... Ok
    Message: 1 mailbox found
  * Imap extension................. Ok
  * Checking mailboxes (1)
    - Dmarc-Rua
      * Accessibility.............. dmarc-srg [error]: imap_getacl: ACL not available on this IMAP server
Ok

=== DIRECTORIES ===
  * Checking directories config.... Ok
    Message: 1 directory found
  * Checking directories (1)
    - Rua-Dir
      * Accessibility.............. Ok
      * Security................... Ok

=== REMOTE FILESYSTEMS ===
  * Getting configuration.......... Skipped
    Message: Configuration not found

=== REPORT MAILER ===
  * Getting configuration.......... Ok
  * Checking mailer/method......... Ok
  * Checking mailer/library........ Ok
  * Checking mailer/default........ Ok
  * Checking mailer/from........... Ok

===
There is 1 warning!


ls -slah config/
total 28K
4.0K drwxr-xr-x 2 root     root 4.0K Apr  4 21:00 .
4.0K drwxr-xr-x 9 root     root 4.0K Apr  4 20:59 ..
8.0K -r--r----- 1 www-data root 5.2K Jan 12  2023 conf.php
 12K -r--r----- 1 root     root  12K Apr  4 20:59 conf.sample.php


@liuch
Copy link
Owner
liuch commented Apr 7, 2024

Hi @olaf7, That's because you ran the script as root. Try running it sometime like this: sudo -u www-data php utils/check_config.php.

Nevertheless, I see your point. I'll try to change this check so that the script doesn't make a mistake at least in such obvious cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0