Skip to content

Commit

Permalink
managing-files: Add example for non root ownership
Browse files Browse the repository at this point in the history
Add an example for non root ownership for files
and parent directories
  • Loading branch information
mohelt committed Aug 31, 2022
1 parent ad26cca commit 9f74c21
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions modules/ROOT/pages/managing-files.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,33 @@ storage:
target: /opt/tools/transmogrifier
hard: false
----

.Example for how to set permissions and ownership for a file and its parent directories
[source,yaml]
----
variant: fcos
version: 1.4.0
storage:
files:
# This creates a file, and sets the ownership
- path: /home/directory/you/want.txt
contents:
inline: Hello, world!
user:
name: exampleuser
group:
name: examplegroup
# This creates the directory that the file should be inside. Its mode is set to 0755 by default, that
# is, readable and executable by all, and writable by the owner.
directories:
- path: /home/directory
user:
name: exampleuser
group:
name: examplegroup
- path: /home/directory/you
user:
name: exampleuser
group:
name: examplegroup
----

0 comments on commit 9f74c21

Please sign in to comment.