fix(core,admin_basic): 정적 게시 재게시 누락 3건 수정 + 관리자 수동 복구 UI + sudo core:update 소유권 정합
- 템플릿 update 는 레이아웃 변경 여부와 무관하게 캐시 버전을 올리고(실패 복원 뒤에도), 자산 주소 방식 전환 3경로도 bump 한다 - config:cache 가 컨테이너 인스턴스를 덮어 이후 terminating 재게시가 사라지던 결함을 복원 헬퍼로 차단 - custom/ 변경 감지와 게시가 같은 열거자(재귀·크기 포함)를 쓰고, 서명은 호스트별로 저장 - 캐시 버전·서명 키를 만료시키지 않는다(기본 TTL 24h 로 매일 전체 재생성되던 문제) - 관리자 > 환경설정 > 일반 「초기 화면 정적 파일」 카드: 상태 조회 + 지금 다시 만들기(확인 모달), 대시보드 알림 버튼 연결, CLI 와 같은 statusReport 소비 - sudo core:update 경로의 root 소유 잔존(설정 디렉토리·임시 폴더·로그·업그레이드 마이그레이션 산출물) 상속·정합화, ext-static 명령 root 경고와 sudo -u 힌트 - 안내·문서·트러블슈팅 4건·audit 룰 ext-cache-version-raw-read·ja 언어팩 동기
This commit is contained in:
1 parent
d263f74cae
commit
de18159986
105 files changed
+4055
-208
No files matched your search
@@ -3,6 +3,7 @@
|
||||
namespace Tests\Unit\Helpers;
|
||||
|
||||
use App\Extension\Helpers\FilePermissionHelper;
|
||||
use App\Extension\Helpers\SettingsMigrator;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -96,6 +97,31 @@ class SettingsMigratorOwnershipTest extends TestCase
|
||||
$this->assertSame($parentOwnerBefore, fileowner($child), '자식 owner 가 부모와 동일');
|
||||
}
|
||||
|
||||
/**
|
||||
* settings 디렉토리 생성도 파일과 대칭으로 부모 소유권을 상속한다 (#651 B1).
|
||||
*
|
||||
* 파일(`writeJsonFile`)만 상속하고 디렉토리(`makeDirectory`)는 상속하지 않던 비대칭 — sudo
|
||||
* 업그레이드 스텝이 디렉토리를 root 로 만들면 `storage/app/{modules,plugins}` 는 restore_ownership
|
||||
* 의도적 제외 경로라 되돌려지지 않고, 이후 웹 프로세스의 그 모듈 설정 저장이 영구 실패한다.
|
||||
*
|
||||
* @effects settings_directory_seed_inherits_ownership
|
||||
*/
|
||||
public function test_settings_migrator_make_directory_invokes_inherit_ownership(): void
|
||||
{
|
||||
$body = (string) file_get_contents((new \ReflectionClass(SettingsMigrator::class))->getFileName());
|
||||
|
||||
$pos = strpos($body, 'File::makeDirectory($settingsDir');
|
||||
$this->assertNotFalse($pos, 'SettingsMigrator 의 settings 디렉토리 생성 지점을 찾지 못했다');
|
||||
|
||||
$window = implode("\n", array_slice(explode("\n", substr($body, $pos)), 0, 4));
|
||||
|
||||
$this->assertStringContainsString(
|
||||
'FilePermissionHelper::inheritOwnershipFromParent($settingsDir)',
|
||||
$window,
|
||||
'SettingsMigrator: settings 디렉토리 생성 뒤 부모 소유권 상속이 없다 (파일만 상속하는 비대칭)'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* SettingsMigrator::writeJsonFile 호출 후 *.json 의 owner 가 부모와 일치.
|
||||
*
|
||||
@@ -107,7 +133,7 @@ class SettingsMigratorOwnershipTest extends TestCase
|
||||
*/
|
||||
public function test_settings_migrator_write_json_file_invokes_inherit_ownership(): void
|
||||
{
|
||||
$reflection = new \ReflectionClass(\App\Extension\Helpers\SettingsMigrator::class);
|
||||
$reflection = new \ReflectionClass(SettingsMigrator::class);
|
||||
$method = $reflection->getMethod('writeJsonFile');
|
||||
$body = file_get_contents($method->getFileName());
|
||||
|
||||
|
||||
Reference in new issue
Block a user