Manage page restrictions
chmod lists or changes explicit page restrictions (view = read, edit = update) for users and groups. It is not Unix chmod: numeric modes such as 755 are rejected. There is no chown in this release.
In the examples below, YOU is your own Atlassian account ID; ACCOUNTID and GROUPID are the other person’s or group’s Confluence ID. chmod PATH lists the current u:ACCOUNTID entries.
See who can view or edit a page
Section titled “See who can view or edit a page”$ chmod ./SecretPageListing does not require -y. The output shows users (u:ACCOUNTID) and groups (g:GROUPID) on that page only. Effective access can still inherit from ancestors.
Preview a group grant, then apply it
Section titled “Preview a group grant, then apply it”$ find ./HR -maxdepth 1 | chmod -n read=+u:YOU read=+g:GROUPID$ find ./HR -maxdepth 1 | chmod -y read=+u:YOU read=+g:GROUPIDPiped stdin is a list of page paths (one per line). Put only the MODE (and flags) on the chmod command; do not mix extra source paths with the pipe. At most 100 paths.
find includes the start path, so this example applies to ./HR and its direct children. Add -name or pipe through grep if you need to drop the start path.
Writes require -y / --yes. Use -n / --dry-run first.
Remove a person, or clear explicit restrictions
Section titled “Remove a person, or clear explicit restrictions”$ chmod -y update=-u:ACCOUNTID read=-u:ACCOUNTID ./SecretPage$ chmod -n clear ./SecretPage$ chmod -y clear ./SecretPage$ find ./folder -name 'Draft*' | chmod -y clearRemove update and read together to take a person off the page completely; any typed order works, because Shell reorders the diffs. update=-u:ACCOUNTID on its own only revokes edit and leaves view. clear deletes every explicit restriction on that page. You cannot remove your own edit (update) restriction.
Other MODE tokens:
$ chmod -n read=+u:YOU read=+u:ACCOUNTID ./SecretPage$ chmod -y read=+u:YOU read=+u:ACCOUNTID ./SecretPage$ chmod -y read=+u:YOU update=+u:YOU read=+u:ACCOUNTID update=+u:ACCOUNTID ./SecretPage$ chmod -y read=+u:YOU read=+g:GROUPID ./SecretPage$ chmod -y update=+u:YOU update=+g:GROUPID ./SecretPage- PATH must be a page. Space-level permissions are out of scope.
- No recursive
-R. Walk the tree withfind, then pipe intochmod. - On view-restricted pages Confluence ties edit (
update) to view (read): a person who can edit also holds view, and removing only an editor’sreadis rejected (HTTP 400). Atlassian is rolling this change out per site, so behavior can differ between sites for a while. - Keep yourself in the restriction. Include your own account (
read=+u:YOU, plusupdate=+u:YOUwhen you grant edit) whenever you add restrictions, group grants included — unless you are sure you are in that group. Otherwise Confluence rejects the write (HTTP 400, “evicts current user”). - Shell applies several
MODEtokens in one safe order: read add, update add, update remove, read remove, and the output saysnote: applied in order: read add, update add, update remove, read removewhen it reorders.clearis a barrier, so diffs are only reordered betweencleartokens, and if the same target is both added and removed in one group your typed order is kept. The run is still not atomic: if a later action fails, earlier successful actions stay applied and the output lists applied / failed / skipped. - If Confluence rejects a change (a 4xx other than 401/403/404), Shell prints a short
hint:line — include your own account when the error says “evicts current user”, otherwise add read first and remove update before read. “Permission denied” is shown only for HTTP 401/403. - Account IDs and group IDs are Confluence IDs, not display names.