Better permission errors #258
This commit is contained in:
parent
f6875fc9cc
commit
9bdb9174fd
@ -43,11 +43,12 @@ class Photo extends Module {
|
|||||||
self::dependencies(isset($this->database));
|
self::dependencies(isset($this->database));
|
||||||
|
|
||||||
# Check permissions
|
# Check permissions
|
||||||
if (hasPermissions(LYCHEE_UPLOADS_BIG)===false||
|
if (hasPermissions(LYCHEE_UPLOADS)===false||
|
||||||
|
hasPermissions(LYCHEE_UPLOADS_BIG)===false||
|
||||||
hasPermissions(LYCHEE_UPLOADS_THUMB)===false||
|
hasPermissions(LYCHEE_UPLOADS_THUMB)===false||
|
||||||
hasPermissions(LYCHEE_UPLOADS_MEDIUM)===false) {
|
hasPermissions(LYCHEE_UPLOADS_MEDIUM)===false) {
|
||||||
Log::error($this->database, __METHOD__, __LINE__, 'Wrong permissions in uploads/');
|
Log::error($this->database, __METHOD__, __LINE__, 'An upload-folder is missing or not readable and writable');
|
||||||
exit('Error: Wrong permissions in uploads-folder!');
|
exit('Error: An upload-folder is missing or not readable and writable!');
|
||||||
}
|
}
|
||||||
|
|
||||||
# Call plugins
|
# Call plugins
|
||||||
|
@ -68,12 +68,12 @@ if (!isset($settings['imagick'])||$settings['imagick']=='') $error .= ('Error
|
|||||||
if (!isset($settings['checkForUpdates'])||($settings['checkForUpdates']!='0'&&$settings['checkForUpdates']!='1')) $error .= ('Error 410: No or wrong property for checkForUpdates in database' . PHP_EOL);
|
if (!isset($settings['checkForUpdates'])||($settings['checkForUpdates']!='0'&&$settings['checkForUpdates']!='1')) $error .= ('Error 410: No or wrong property for checkForUpdates in database' . PHP_EOL);
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
if (hasPermissions(LYCHEE_UPLOADS_BIG)===false) $error .= ('Error 500: Wrong permissions for \'uploads/big\' (777 required)' . PHP_EOL);
|
if (hasPermissions(LYCHEE_UPLOADS_BIG)===false) $error .= ('Error 500: \'uploads/big\' missing or not readable and writable (777 required)' . PHP_EOL);
|
||||||
if (hasPermissions(LYCHEE_UPLOADS_MEDIUM)===false) $error .= ('Error 500: Wrong permissions for \'uploads/medium\' (777 required)' . PHP_EOL);
|
if (hasPermissions(LYCHEE_UPLOADS_MEDIUM)===false) $error .= ('Error 500: \'uploads/medium\' missing or not readable and writable (777 required)' . PHP_EOL);
|
||||||
if (hasPermissions(LYCHEE_UPLOADS_THUMB)===false) $error .= ('Error 501: Wrong permissions for \'uploads/thumb\' (777 required)' . PHP_EOL);
|
if (hasPermissions(LYCHEE_UPLOADS_THUMB)===false) $error .= ('Error 501: \'uploads/thumb\' missing or not readable and writable (777 required)' . PHP_EOL);
|
||||||
if (hasPermissions(LYCHEE_UPLOADS_IMPORT)===false) $error .= ('Error 502: Wrong permissions for \'uploads/import\' (777 required)' . PHP_EOL);
|
if (hasPermissions(LYCHEE_UPLOADS_IMPORT)===false) $error .= ('Error 502: \'uploads/import\' missing or not readable and writable (777 required)' . PHP_EOL);
|
||||||
if (hasPermissions(LYCHEE_UPLOADS)===false) $error .= ('Error 503: Wrong permissions for \'uploads/\' (777 required)' . PHP_EOL);
|
if (hasPermissions(LYCHEE_UPLOADS)===false) $error .= ('Error 503: \'uploads/\' missing or not readable and writable (777 required)' . PHP_EOL);
|
||||||
if (hasPermissions(LYCHEE_DATA)===false) $error .= ('Error 504: Wrong permissions for \'data/\' (777 required)' . PHP_EOL);
|
if (hasPermissions(LYCHEE_DATA)===false) $error .= ('Error 504: \'data/\' missing or not readable and writable (777 required)' . PHP_EOL);
|
||||||
|
|
||||||
# Check dropboxKey
|
# Check dropboxKey
|
||||||
if (!$settings['dropboxKey']) echo('Warning: Dropbox import not working. No property for dropboxKey.' . PHP_EOL);
|
if (!$settings['dropboxKey']) echo('Warning: Dropbox import not working. No property for dropboxKey.' . PHP_EOL);
|
||||||
|
Loading…
Reference in New Issue
Block a user