Podcast-server/admin/check_perms.php

26 lines
524 B
PHP

<?php
$dirs = [
'../assets/uploads/audio/',
'../assets/uploads/images/',
'backups/'
];
echo "PHP User: " . get_current_user() . " (UID: " . getmyuid() . ")<br>";
echo "Process User: " . exec('whoami') . "<br><br>";
foreach ($dirs as $dir) {
echo "Checking $dir: ";
if (is_dir($dir)) {
echo "EXISTS, ";
if (is_writable($dir)) {
echo "WRITABLE.";
} else {
echo "NOT WRITABLE.";
}
} else {
echo "NOT FOUND.";
}
echo "<br>";
}
?>