fp-content file/folder permissions recursively during setup
- Update chmod info in the administration area - fp-content gets the necessary permissions recursively during setup
This commit is contained in:
parent
43dcd8bc33
commit
687482c76e
@ -15,7 +15,7 @@
|
|||||||
'opt5' => 'Zjistit aktualizace',
|
'opt5' => 'Zjistit aktualizace',
|
||||||
|
|
||||||
'chmod_info' => "Následující oprávnění <strong>nemůžou být</strong>
|
'chmod_info' => "Následující oprávnění <strong>nemůžou být</strong>
|
||||||
resetované na 0777; pravděpodobně vlastník souborů není stejná osoba jako vlastník webu. Případně můžete ignorovat toto oznámení.",
|
resetované na 0775; pravděpodobně vlastník souborů není stejná osoba jako vlastník webu. Případně můžete ignorovat toto oznámení.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ $lang ['admin'] ['maintain'] ['default'] = array(
|
|||||||
'opt5' => 'Prüfe auf neue Versionen',
|
'opt5' => 'Prüfe auf neue Versionen',
|
||||||
|
|
||||||
'chmod_info' => "Die Dateizugriffsrechte <strong>konnten nicht</strong>
|
'chmod_info' => "Die Dateizugriffsrechte <strong>konnten nicht</strong>
|
||||||
auf die Default Werte von 0777 zurückgesetzt werden.
|
auf die Default Werte von 0775 zurückgesetzt werden.
|
||||||
Normalerweise kann man diesen Hinweis ignorieren."
|
Normalerweise kann man diesen Hinweis ignorieren."
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'opt5' => 'Έλεγχος για αναβαθμίσεις',
|
'opt5' => 'Έλεγχος για αναβαθμίσεις',
|
||||||
|
|
||||||
'chmod_info' => "Τα ακόλουθα δικαιώματα αρχείων <strong>δεν μπόρεσαν</strong>
|
'chmod_info' => "Τα ακόλουθα δικαιώματα αρχείων <strong>δεν μπόρεσαν</strong>
|
||||||
να επανέλθουν σε 0777; πιθανότατα ο ιδιοκτήτης των αρχείων δεν είναι ο ίδιος με τον ιδιοκτήτη του διακομιστή. Συνήθως αυτή η ειδοποίηση μπορεί να αγνοηθεί.",
|
να επανέλθουν σε 0775; πιθανότατα ο ιδιοκτήτης των αρχείων δεν είναι ο ίδιος με τον ιδιοκτήτη του διακομιστή. Συνήθως αυτή η ειδοποίηση μπορεί να αγνοηθεί.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'opt5' => 'Check for updates',
|
'opt5' => 'Check for updates',
|
||||||
|
|
||||||
'chmod_info' => "The following file permissions <strong>could not</strong>
|
'chmod_info' => "The following file permissions <strong>could not</strong>
|
||||||
be reset to 0777; probably file owner is not the same as the
|
be reset to 0775; probably file owner is not the same as the
|
||||||
webserver's. Usually you can ignore this notice.",
|
webserver's. Usually you can ignore this notice.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'opt5' => 'Buscar actualizaciones',
|
'opt5' => 'Buscar actualizaciones',
|
||||||
|
|
||||||
'chmod_info' => "Los siguientes permisos de archivo <strong>no pudieron</strong>
|
'chmod_info' => "Los siguientes permisos de archivo <strong>no pudieron</strong>
|
||||||
ser reiniciados a 0777; probablemente el propietario del archivo no sea el mismo que el
|
ser reiniciados a 0775; probablemente el propietario del archivo no sea el mismo que el
|
||||||
del servidor web. Por lo general, puede ignorar este aviso.",
|
del servidor web. Por lo general, puede ignorar este aviso.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
'opt5' => 'Vérifier les mises à jour',
|
'opt5' => 'Vérifier les mises à jour',
|
||||||
|
|
||||||
'chmod_info' => "Les permissions de fichiers (chmod) <strong>ne sont peut-être pas</strong>
|
'chmod_info' => "Les permissions de fichiers (chmod) <strong>ne sont peut-être pas</strong>
|
||||||
à 0777; propriétaire du fichier peut-être différent du serveur web.",
|
à 0775; propriétaire du fichier peut-être différent du serveur web.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'opt5' => 'Controllo aggiornamenti',
|
'opt5' => 'Controllo aggiornamenti',
|
||||||
|
|
||||||
'chmod_info' => "I seguenti permessi dei file <strong>non possono</strong>
|
'chmod_info' => "I seguenti permessi dei file <strong>non possono</strong>
|
||||||
essere ripristinati a 0777; probabilmente il proprietario non è lo stesso del
|
essere ripristinati a 0775; probabilmente il proprietario non è lo stesso del
|
||||||
server web. Di solito puoi ignorare questo avviso.",
|
server web. Di solito puoi ignorare questo avviso.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
'opt4' => 'PHP情報を表示します',
|
'opt4' => 'PHP情報を表示します',
|
||||||
'opt5' => 'アップデートをチェックします',
|
'opt5' => 'アップデートをチェックします',
|
||||||
|
|
||||||
'chmod_info' => "次のファイルのパーミッションを 0777 にリセット<strong>できません</strong>
|
'chmod_info' => "次のファイルのパーミッションを 0775 にリセット<strong>できません</strong>
|
||||||
; おそらく、ファイルの所有権者とウェブサーバの権限が異なるのでしょう。
|
; おそらく、ファイルの所有権者とウェブサーバの権限が異なるのでしょう。
|
||||||
でも通常、この通知を無視することができます。",
|
でも通常、この通知を無視することができます。",
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
'opt5' => 'Controleren op updates',
|
'opt5' => 'Controleren op updates',
|
||||||
|
|
||||||
'chmod_info' => "De volgende bestandsmachtigingen <strong>kan niet</strong>
|
'chmod_info' => "De volgende bestandsmachtigingen <strong>kan niet</strong>
|
||||||
worden teruggezet naar 0777; waarschijnlijk is de bestandseigenaar niet hetzelfde als de
|
worden teruggezet naar 0775; waarschijnlijk is de bestandseigenaar niet hetzelfde als de
|
||||||
webserver's. Meestal kunt u deze kennisgeving negeren.",
|
webserver's. Meestal kunt u deze kennisgeving negeren.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
'opt4' => 'Mostre as informações sobre o PHP',
|
'opt4' => 'Mostre as informações sobre o PHP',
|
||||||
'opt5' => 'Procure atualizações',
|
'opt5' => 'Procure atualizações',
|
||||||
|
|
||||||
'chmod_info' => "As seguintes permissões de arquivo <strong>não puderam</strong> ser redefinidas para 0777; provavelmente o proprietário do arquivo não é o mesmo do servidor da web. Geralmente você pode ignorar este aviso.",
|
'chmod_info' => "As seguintes permissões de arquivo <strong>não puderam</strong> ser redefinidas para 0775; provavelmente o proprietário do arquivo não é o mesmo do servidor da web. Geralmente você pode ignorar este aviso.",
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
'opt5' => 'Preveri posodobitve',
|
'opt5' => 'Preveri posodobitve',
|
||||||
|
|
||||||
'chmod_info' => "Naslednja dovoljenja za datoteke <strong>ni mogoče</strong>
|
'chmod_info' => "Naslednja dovoljenja za datoteke <strong>ni mogoče</strong>
|
||||||
povrniti na 0777; verjetno lastnik datoteke ni isti kot
|
povrniti na 0775; verjetno lastnik datoteke ni isti kot
|
||||||
spletne strežnik. Običajno lahko to obvestilo prezrete.",
|
spletne strežnik. Običajno lahko to obvestilo prezrete.",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1,8 +1,37 @@
|
|||||||
<?php
|
<?php
|
||||||
error_reporting($_SERVER ["SERVER_NAME"] == "localhost" ? E_ALL : 0);
|
error_reporting($_SERVER ["SERVER_NAME"] == "localhost" ? E_ALL : 0);
|
||||||
chmod("./fp-content/", 0775);
|
|
||||||
|
|
||||||
$language = @$_POST ['language']? $_POST ['language'] : $browserLang;
|
// Changing file/directory permissions recursively
|
||||||
|
$start_dir = FP_CONTENT; // Starting directory
|
||||||
|
$perms ['file'] = FILE_PERMISSIONS; // chmod value for files
|
||||||
|
$perms ['folder'] = DIR_PERMISSIONS; // chmod value for folders
|
||||||
|
|
||||||
|
function chmod_file_folder($dir) {
|
||||||
|
global $perms;
|
||||||
|
|
||||||
|
$dh = @opendir($dir);
|
||||||
|
|
||||||
|
if ($dh) {
|
||||||
|
|
||||||
|
while (false !== ($file = readdir($dh))) {
|
||||||
|
|
||||||
|
if ($file != "." && $file != "..") {
|
||||||
|
|
||||||
|
$fullpath = $dir . '/' . $file;
|
||||||
|
if (!is_dir($fullpath)) {
|
||||||
|
|
||||||
|
chmod($fullpath, $perms ['file']);
|
||||||
|
} else {
|
||||||
|
chmod($fullpath, $perms ['folder']);
|
||||||
|
chmod_file_folder($fullpath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($dh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$language = @$_POST ['language'] ?$_POST ['language'] : $browserLang;
|
||||||
|
|
||||||
$lf = "lang.$language.php";
|
$lf = "lang.$language.php";
|
||||||
if (!preg_match('|^lang\.[a-z]{2}-[a-z]{2}\.php$|', $lf))
|
if (!preg_match('|^lang\.[a-z]{2}-[a-z]{2}\.php$|', $lf))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user