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
@@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Services;
|
||||
|
||||
use App\Contracts\Extension\CacheInterface;
|
||||
use App\Exceptions\CustomAssetOperationException;
|
||||
use App\Extension\Helpers\FilePermissionHelper;
|
||||
use App\Extension\HookManager;
|
||||
use App\Extension\Traits\ClearsTemplateCaches;
|
||||
use App\Rules\AllowedTemplateFileType;
|
||||
@@ -279,7 +279,9 @@ class CustomAssetService
|
||||
CustomAssets::flushCache();
|
||||
|
||||
try {
|
||||
app(CacheInterface::class)->forget(CustomAssets::SIGNATURE_CACHE_KEY);
|
||||
// 서명을 쓰는 뷰 컴포저와 **같은 통로**(고정 스토어·코어 네임스페이스)로 지운다 —
|
||||
// 다른 통로로 지우면 그쪽 서명이 남아 다음 렌더가 같은 변경을 한 번 더 bump 한다.
|
||||
self::customSignatureCache()->forget(CustomAssets::SIGNATURE_CACHE_KEY);
|
||||
} catch (\Exception $e) {
|
||||
Log::warning('사용자 추가 에셋 서명 캐시 삭제 실패', ['error' => $e->getMessage()]);
|
||||
}
|
||||
@@ -385,8 +387,24 @@ class CustomAssetService
|
||||
return;
|
||||
}
|
||||
|
||||
if (! @mkdir($directory, 0755, true) && ! is_dir($directory)) {
|
||||
throw new CustomAssetOperationException('custom_assets.errors.directory_failed', ['path' => $directory]);
|
||||
// 확보는 코어 공통 프리미티브가 맡는다 — 소유권 상속·그룹 쓰기까지 정합화하고, 실패는 예외가 아니라
|
||||
// 사유로 올라온다. `custom/` 은 지연 생성이라 `deploy:deploy 0755` 로 배포된 확장 디렉토리에서
|
||||
// 첫 저장이 여기서 실패하는데, 경로만 적으면 운영자가 무엇을 고쳐야 하는지 알 수 없다(#651 D6).
|
||||
// 사유·소유자·권한·실행 계정·조치 예시를 함께 싣는다 (정적 게시 프리플라이트와 같은 식).
|
||||
if (FilePermissionHelper::ensureWritableDirectory($directory, 0775, $failure)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$failedPath = (string) ($failure['path'] ?? $directory);
|
||||
$reason = (string) ($failure['reason'] ?? 'create_failed');
|
||||
|
||||
throw new CustomAssetOperationException('custom_assets.errors.directory_failed', [
|
||||
'path' => $directory,
|
||||
'reason' => __('custom_assets.errors.reason.'.$reason),
|
||||
'owner' => (string) (@fileowner($failedPath) ?: 'unknown'),
|
||||
'perms' => file_exists($failedPath) ? substr(sprintf('%o', @fileperms($failedPath)), -4) : 'absent',
|
||||
'process_user' => ExtensionStaticCacheService::currentProcessUser(),
|
||||
'hint' => __('custom_assets.errors.directory_failed_hint', ['path' => $failedPath]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user