Update sync cache file sizes and add script for setting upload directory permissions

This commit is contained in:
2025-03-24 23:46:12 +01:00
parent 57cfad02ed
commit f9346d4995
3 changed files with 56 additions and 7 deletions

View File

@@ -689,7 +689,7 @@
},
"tuzzer.scss": {
"type": "-",
"size": 35799,
"size": 33943,
"lmtime": 0,
"modified": true
},
@@ -777,6 +777,12 @@
"lmtime": 0,
"modified": true
},
"home-new.scss": {
"type": "-",
"size": 8301,
"lmtime": 0,
"modified": false
},
"opinie-i-gwiazdki.scss": {
"type": "-",
"size": 140,
@@ -797,8 +803,8 @@
},
"style.scss": {
"type": "-",
"size": 232842,
"lmtime": 1741724979351,
"size": 232915,
"lmtime": 1742757945560,
"modified": false
},
"ekspansja-miedzynarodowa.scss": {
@@ -869,6 +875,12 @@
"lmtime": 0,
"modified": false
},
"home-new.css": {
"type": "-",
"size": 14845,
"lmtime": 0,
"modified": false
},
"opinie.css.map": {
"type": "-",
"size": 6373,
@@ -881,6 +893,12 @@
"lmtime": 0,
"modified": false
},
"home-new.css.map": {
"type": "-",
"size": 4847,
"lmtime": 0,
"modified": false
},
"dla-hoteli-i-restauracji.css.map": {
"type": "-",
"size": 4115,
@@ -895,8 +913,8 @@
},
"style.css.map": {
"type": "-",
"size": 947730,
"lmtime": 1741724982250,
"size": 947880,
"lmtime": 1742757947843,
"modified": false
},
"dla-produktow.css": {
@@ -961,8 +979,8 @@
},
"style.css": {
"type": "-",
"size": 596295,
"lmtime": 1741724982250,
"size": 596343,
"lmtime": 1742757947843,
"modified": false
},
"opinie-dla-horeca.css": {

31
script.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
/**
* Ustawia rekursywnie uprawnienia 0777 dla folderu "upload" i jego zawartości.
*/
function setPermissions($path) {
// Ustaw uprawnienia 0777 dla bieżącej ścieżki
if (!chmod($path, 0777)) {
echo "Nie udało się ustawić uprawnień dla: $path\n";
}
// Jeśli to katalog, przejdź do jego zawartości
if (is_dir($path)) {
$items = scandir($path);
foreach ($items as $item) {
if ($item === '.' || $item === '..') {
continue;
}
setPermissions($path . DIRECTORY_SEPARATOR . $item);
}
}
}
$uploadDir = __DIR__ . '/upload';
if (is_dir($uploadDir)) {
setPermissions($uploadDir);
echo "Uprawnienia 777 zostały ustawione dla folderu 'upload' i jego zawartości.\n";
} else {
echo "Folder 'upload' nie istnieje.\n";
}

View File