File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ func (s SiteService) CreateSite(ctx context.Context, opts CreateSiteOptions) err
312312 s .console .Bullet ("write " + vhostDefinition )
313313 s .console .Bullet ("append virtualhost block into " + serverConfigPath )
314314 s .console .Bullet ("insert listener map in " + serverConfigPath )
315- s .console .Bullet ("align ownership to parent directories for " + siteRoot + " and " + vhostDir )
315+ s .console .Bullet ("align ownership to OpenLiteSpeed server user/group for " + siteRoot + " and " + vhostDir )
316316 if opts .OWASPEnabled != nil {
317317 s .console .Bullet ("set virtual-host OWASP mod_security: " + enabledLabel (* opts .OWASPEnabled ))
318318 }
@@ -415,8 +415,11 @@ func (s SiteService) CreateSite(ctx context.Context, opts CreateSiteOptions) err
415415 }
416416 }
417417
418- if err := s .inheritOwnershipFromParent (siteRoot , vhostDir ); err != nil {
419- s .console .Warn ("Could not align site ownership with parent directory ownership: " + err .Error ())
418+ if err := s .applyServerConfiguredOwnership (serverConfigPath , siteRoot , vhostDir ); err != nil {
419+ s .console .Warn ("Could not align site ownership with OpenLiteSpeed user/group from server config: " + err .Error ())
420+ if err := s .inheritOwnershipFromParent (siteRoot , vhostDir ); err != nil {
421+ s .console .Warn ("Could not align site ownership with parent directory ownership: " + err .Error ())
422+ }
420423 }
421424
422425 if err := s .registerDomainInServerConfig (opts .Domain , siteRoot , vhostConfig , serverConfigPath ); err != nil {
You can’t perform that action at this time.
0 commit comments