Filesystem permissions

12 views
Skip to first unread message

Nicholas Bayle

unread,
May 30, 2019, 12:31:26 PM5/30/19
to packe...@googlegroups.com
Is there a trick to creating a file in the filesystem root (/) using a provisioner? I cannot get past the permission denied, even with sudo, yet the chef provisioner that follows runs fine and can modify everything.

 28     {
 29       "type": "shell",
 30       "inline": ["echo 'vagrant' | sudo -S echo '{ \"platform_type\": \"vm\" }' > /.platform_info"]
 31     },

==> vmware-vmx: /tmp/script_7904.sh: 2: /tmp/script_7904.sh: cannot create /.platform_info: Permission denied

This command works fine with the docker builder because permissions are a fantasy there, but any other builder (aws, vm) it fails.

Rickard von Essen

unread,
May 30, 2019, 1:40:03 PM5/30/19
to packe...@googlegroups.com

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CAGzi4%3D594RpsFNkqEg%2Bnvhtn5iaP5HPNAQuCa9xUuYiY0SVZPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Nicholas Bayle

unread,
May 30, 2019, 2:28:35 PM5/30/19
to packe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages