Skip to content

The permissions.json file

philipl edited this page Feb 8, 2014 · 3 revisions

The permissions.json file is a secondary, optional, part of the parcel metadata. It contains file ownership and mode information that should be applied to specific files after the parcel is unpacked (eg: For setting the suid bit on binary).

Why this is necessary

tar files have a limited ability to preserve file ownership and mode information, but this is insufficient to handle all situations.

  • user/group probably don't exist at unpack time: Given that parcel specific users are created by reading the parcel.json file, they won't exist at the time we unpack the parcel, meaning that ownership cannot be preserved.
  • suid/gid bits are not preserved: if you do need to mark a file suid/sgid, it cannot be done through tar.

Consequently, all files are unpacked to the current CM Agent user (usually root) and specific files can get their permissions updated using permissions.json

Clone this wiki locally