Chapter 3. Locking Cartridges
locked_files entry in the $cartridge_name/metadata/managed_files.yml file is permanently unlocked. This approach is not recommended, but it may be sufficient for simple cartridges.
Note
3.1. Cartridge Lock Configuration
locked_files entry in the $cartridge_name/metadata/managed_files.yml file lists files and directories that OpenShift Enterprise locks at certain points during the cartridge life cycle.
locked_files list does not exist, OpenShift Enterprise creates the file before your setup script is called. OpenShift Enterprise also creates missing directories if required.
locked_files list. For example, create ~/.node-gyp and ~/.npm in a node.js cartridge using a setup or install script.
~/ start at the gear directory. All other entries start at the cartridge directory. Entries that end with a forward slash (/) are treated as directories. Entries that end with an asterisk (*) are treated as lists of files. Entries that end with any other character are treated as files.
Note
locked_files entries are not accurate.
Example 3.1. PHP locked_files Configuration Entry
locked_files: - ~/.pearrc - bin/ - conf/*
~/.pearrc: when locked, you can edit this file but application developers cannot.php/bin/: the directory is locked but not the files it contains. Only you can add files to the directory, but both you and application developers can edit those files.php/conf/*: the directory is not locked, but the files in the directory are locked. Both you and application developers can add files to the directory, but only you can edit them.
All visible files and directories in a gear's home directory are reserved. Certain hidden files are also reserved. While a cartridge is unlocked, you can create any unreserved hidden file or directory in the gear's home directory.
Reserved Hidden Files
~/.ssh~/.sandbox~/.tmp~/.env

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.