mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-02 02:17:48 -05:00
* Apache protect more non-public folders * Also protect root * Do the same for /p/ * Simplify Require all denied In case of Apache 2.2, it will just make an error 500 instead of 403 * .htaccess.dist * Simplify * Better comment
36 lines
506 B
PHP
Executable File
36 lines
506 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
declare(strict_types=1);
|
|
require(__DIR__ . '/_cli.php');
|
|
|
|
$dirs = [
|
|
'/',
|
|
'/cache',
|
|
'/extensions-data',
|
|
'/favicons',
|
|
'/fever',
|
|
'/PubSubHubbub',
|
|
'/PubSubHubbub/feeds',
|
|
'/PubSubHubbub/keys',
|
|
'/tokens',
|
|
'/users',
|
|
'/users/_',
|
|
];
|
|
|
|
$ok = true;
|
|
|
|
foreach ($dirs as $dir) {
|
|
@mkdir(DATA_PATH . $dir, 0770, true);
|
|
$ok &= touch(DATA_PATH . $dir . '/index.html');
|
|
}
|
|
|
|
file_put_contents(DATA_PATH . '/.htaccess', <<<'EOF'
|
|
Require all denied
|
|
|
|
EOF
|
|
);
|
|
|
|
accessRights();
|
|
|
|
done((bool)$ok);
|