chmod-1.6.0
2 minute read
KOSI Plugin chmod Version 1.6.0
Summary
By specifying a path, state and mode you can change the acces permissioins for the given file or directory. The state value can be “file” or “directory”. In the later case a recursive directory traversal is performed. With mode the access permissions are specified in the numerical representation usual with linux.
Keys
Key | Description | |
---|---|---|
path | Mandatory | Set it to the absolute path of the file or directory whose access rights you want to change. |
state | Mandatory | set it to “file” / “directory” depending upon the path is a file or directory. |
mode | Mandatory | Set the permission mode of the file in classic numeric linux syntax. This plugin supports both three-digit and four-digit octal representation. |
sudo | optional | Set it to use sudo for your chmod-command.If you set sudo. |
sudoPassword | optional | Set it to give a sudoPassword. |
Note: If you’re not yet familiar with Linux permissions, check out this short introduction from RedHat.
Example
languageversion = "1.0.0";
apiversion = "kubernative/kubeops/sina/user/v4";
name = "kosi-example-packagev3";
description = "kosi-example-package";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";
files =
{
input="template.yaml";
}
containers =
{
example=["docker.io", "nginx", "latest"];
}
install
{
cmd(command="echo Using the chmod-plugin");
chmod(path="/user/myuser/myUserApp.sh";state="file";mode="777");
}
Example 2
languageversion = "1.0.0";
apiversion = "kubernative/kubeops/sina/user/v4";
name = "kosi-example-packagev3";
description = "kosi-example-package";
version = "0.1.0";
docs = "docs.tgz";
logo = "logo.png";
files =
{
input="template.yaml";
}
containers =
{
example=["docker.io", "nginx", "latest"];
}
install
{
cmd(command="echo Using the chmod-plugin");
chmod(path="/root/myRootApp.sh";state="file";mode="777";sudo="true";sudoPassword="myPassword");
}