Reset site permissions

Reset file and directory permissions for your site.


POST/api/servers/{server}/sites/{id}/permission-reset

Reset permissions

This endpoint resets the file and directory permissions for your site to a default, secure state. This includes setting the ownership for all applicable files and directories.

Why you might need this:

  • You've accidentally changed permissions and can't access certain files
  • Your site is experiencing issues due to incorrect file or directory permissions
  • You want to ensure that your site's files are securely configured

Request

POST
/api/servers/{server}/sites/{id}/permission-reset
curl -X POST "https://ploi.io/api/servers/{server}/sites/{id}/permission-reset" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json"

Response

{
  "data": {
    "id": 1,
    "status": "active",
    "server_id": 1,
    "domain": "filapanel.com",
    "test_domain": null,
    "deploy_script": "cd /home/ploi/filapanel.com\ngit pull origin main...",
    "deploy_webhook_url": "https://ploi.io.....",
    "web_directory": "/public",
    "project_type": "laravel",
    "project_root": "/",
    "last_deploy_at": "2023-09-05 07:39:57",
    "system_user": "ploi",
    "php_version": 8.2,
    "health_url": null,
    "disable_robots": false,
    "has_repository": false,
    "zero_downtime_deployment": false,
    "has_staging": false,
    "fastcgi_cache": false,
    "notes": null,
    "created_at": "2023-08-29 12:08:10"
  },
  "message": "Site permissions are being reset in the background"
}