Skip to content

Commit

Permalink
fix: early warning if file permission problem
Browse files Browse the repository at this point in the history
  • Loading branch information
dvikan committed Feb 2, 2024
1 parent 81be72e commit a0c23c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ Learn more in

## How-to

### How to fix "Access denied."

Output is from php-fpm. It is unable to read index.php.

chown rss-bridge:rss-bridge /var/www/rss-bridge/index.php

### How to password-protect the instance (token)

Modify `config.ini.php`:
Expand Down
6 changes: 6 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
exit;
}

if (! is_readable(__DIR__ . '/lib/bootstrap.php')) {
http_response_code(500);
print 'Unable to read lib/bootstrap.php. Check file permissions.';
exit;
}

require_once __DIR__ . '/lib/bootstrap.php';

set_exception_handler(function (\Throwable $e) {
Expand Down

0 comments on commit a0c23c3

Please sign in to comment.