Last modified November 7, 2024
manageFilePermissions
This function allows you to create/modify the File Permissions Object.
Parameter name | Type | Description | Possible Values | Example |
---|---|---|---|---|
action | String | REQUIRED on both create/modify. The action you want to perform |
|
action=create |
regex | String | REQUIRED on action create. The regex for the File/Folder name you want the rule to apply to. | regex=public_html |
|
_id | String | REQUIRED Filter Permissions ID of the Filter Permissions Object you are modifying | _id=650a0e808df8a8d49500eac2 |
|
Category | String | REQUIRED on action create. The category this File Permissions rule will be used for. | For a full list of available categories, please see the File Permissions Object below. | category=1 |
owner | String | Name of the owner you will like to assign. | owner=root |
|
group | String | Name of the group you will like to assign. | group=nobody |
|
recursive | Boolean | Boolean value to determine if the permissions rule will apply to all files/folders under the specified regex. | recursive=1 |
|
dirs_permissions | String | The permissions value you will like to give to directories. | dirs_permissions=0755 |
|
files_permissions | String | The permissions value you will like to give to files. | files_permissions=0644 |
Example Call JETAPI
jetbackup5api -F manageFilePermissions -D "action=create®ex=public_html&category=1&owner=example&group=nobody&recursive=1&dirs_permissions=0755&files_permissions=0644"
jetbackup5api -F manageFilePermissions -D "action=modify&_id={$FILE_PERMISSIONS_ID}®ex=public_html&category=1&owner=example&group=nobody&recursive=1&dirs_permissions=0755&files_permissions=0644"
success: 1
message: File Permissions Created/Updated Successfully
system:
version: 5.3.3
version_panel: 5.3.3
tier: EDGE
type: cPanel
retry_ms: 0
disableui:
dr:
agreement_panel:
agreement:
licenseIssue:
data:
_id: 650a0e808df8a8d49500eac2
regex: public_html
category: 1
owner: example
group: nobody
recursive: 1
dirs_permissions: 0755
files_permissions: 0644
Example Call HTTP
https://hostname.example.com:2087/cpsess##########/cgi/addons/jetbackup5/api.cgi?function=manageFilePermission&action=create®ex=public_html&category=1&owner=example&group=nobody&recursive=1&dirs_permissions=0755&files_permissions=0644
https://hostname.example.com:2087/cpsess##########/cgi/addons/jetbackup5/api.cgi?function=manageFilePermission&action=modify&_id={$FILE_PERMISSIONS_ID}®ex=public_html&category=1&owner=example&group=nobody&recursive=1&dirs_permissions=0755&files_permissions=0644
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.