wp-host
Version:
Automated WordPress hosting deployment tool for bulk site creation with MySQL database management
76 lines • 2.35 kB
TypeScript
import { Config, SiteConfig, DeploymentResult } from './types';
export declare class PermissionsManager {
private config;
constructor(config: Config);
/**
* Set file permissions for all WordPress sites
*/
setAllPermissions(): Promise<DeploymentResult[]>;
/**
* Set permissions for a single WordPress site
*/
setSitePermissions(site: SiteConfig): Promise<DeploymentResult>;
/**
* Verify that WordPress is installed in the target directory
*/
verifyWordPressInstallation(targetDir: string): Promise<void>;
/**
* Set directory permissions to 755 (owner: rwx, group: rx, others: rx)
*/
setDirectoryPermissions(targetDir: string): Promise<void>;
/**
* Recursively set directory permissions
*/
setDirectoryPermissionsRecursive(dirPath: string): Promise<void>;
/**
* Check if a file is a system file that shouldn't be modified
*/
private isSystemFile;
/**
* Set file permissions to 644 (owner: rw, group: r, others: r)
*/
setFilePermissions(targetDir: string): Promise<void>;
/**
* Recursively set file permissions
*/
setFilePermissionsRecursive(dirPath: string): Promise<void>;
/**
* Set special permissions for specific WordPress files
*/
setSpecialPermissions(targetDir: string): Promise<void>;
/**
* Check permissions for all sites
*/
checkAllPermissions(): Promise<void>;
/**
* Check permissions for a single site
*/
checkSitePermissions(site: SiteConfig): Promise<{
hasWordPress: boolean;
directoriesOk: boolean;
filesOk: boolean;
wpConfigOk: boolean;
wpContentOk: boolean;
}>;
/**
* Check if file/directory has the expected permissions
*/
checkPermissions(currentMode: number, expectedMode: number): boolean;
/**
* Fix permissions for all sites
*/
fixAllPermissions(): Promise<void>;
/**
* Get permissions summary
*/
getSummary(results: DeploymentResult[]): {
total: number;
successful: number;
failed: number;
};
/**
* Get platform-specific permission setting command for manual fixing
*/
getManualPermissionCommands(sitePath: string): string[];
}
//# sourceMappingURL=permissions-manager.d.ts.map