mender-artifact install -m <mode> <src> <dst> to install files into a mender artifact, but I’m seeing the file created with the same permissions as the
src file, instead of permissions set by the
Here are the steps I’m following:
$ stat -c %a src_file 644 $ mender-artifact install -m 0777 src_file artifact.mender:/dst_file $ tar -xf artifact.mender $ tar -xzf data/0000.tar.gz $ debugfs file-system.ext4 debugfs: stat /dst_file Inode: 3958 Type: regular Mode: 0600 Flags: 0x80000 Generation: 0 Version: 0x00000000 User: 0 Group: 0 Size: 23707147 File ACL: 0 Links: 1 Blockcount: 46304 Fragment: Address: 0 Number: 0 Size: 0 ctime: 0x5db20f50 -- Thu Oct 24 20:53:36 2019 atime: 0x5db20f50 -- Thu Oct 24 20:53:36 2019 mtime: 0x5db20f50 -- Thu Oct 24 20:53:36 2019
I’ve added some logic to the
mender-artifact install command to verify the
mode value I’m passing in is being parsed correctly (
0755 parses as
-rwxr-xr-x for instance), but it seems like the
mode value is not available at the time we actually create the
dst file with a
I noticed there’s also a unit test in
Install file, standard permissions (0600), but it’s failing on my machine. Has anyone seen similar behavior or have an idea what’s going on here?
I’m happy to dig in and experiment a little, but I’m not super familiar with Go. Thanks for the help!