Mender.conf error with mender-convert-modify

Once I configure the mender client server configuration, I have my mender.conf file in roots_overlay_demo. However it is only accessible with sudo nano. Xcode doesn’t seem to be able to view it.

When I run mender-convert, I get the following error:

mender-convert-extract has finished. Cleaning up...

Running mender-convert-modify: --disk-image input/golden-image-1.img --config configs/raspberrypi4_config --overlay rootfs_overlay_demo/

2020-12-15 11:40:46 [INFO] [mender-convert-modify] Using configuration file: configs/mender_convert_config

2020-12-15 11:40:46 [INFO] [mender-convert-modify] Using configuration file: configs/raspberrypi4_config

2020-12-15 11:40:46 [INFO] [mender-convert-modify] Installing Mender client and related files

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Using root device A in mender.conf: /dev/mmcblk0p2

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Using root device B in mender.conf: /dev/mmcblk0p3

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Creating state scripts version file.

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Installing a custom /etc/fstab (see work/convert.log for more info)

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Using boot partition device in fstab: /dev/mmcblk0p1

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Using data partition device in fstab: /dev/mmcblk0p4

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Performing platform specific modifications (if any)

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Running hook: platform_modify

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Performing user/local specific modifications (if any)

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Running hook: user_local_modify

2020-12-15 11:40:51 [INFO] [mender-convert-modify] Applying rootfs overlay: rootfs_overlay_demo/

mender-convert-modify has finished. Cleaning up...

2020-12-15 11:40:54 [ERROR] [mender-convert] mender-convert failed

2020-12-15 11:40:52 [DEBUG] [mender-convert-modify] When running: (./mender-convert-modify:317): run_and_log_cmd():

sudo rsync --archive --keep-dirlinks --verbose rootfs_overlay_demo// work/rootfs/

sending incremental file list

./

.gitkeep

etc/

etc/mender/

rsync: send_files failed to open "/mender-convert/rootfs_overlay_demo/etc/mender/mender.conf": Operation not permitted (1)

sent 224 bytes received 73 bytes 594.00 bytes/sec

total size is 846 speedup is 2.85

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1207) [sender=3.1.3]

2020-12-15 11:40:54 [ERROR] [mender-convert] mender-convert failed

2020-12-15 11:40:54 [ERROR] [mender-convert] mender-convert exit code: 23

I tried setting permissions with sudo chmod +x mender.conf but it hasn’t worked. Any advice on how to fix this would be appreciated!

What does the following show you:

ls -alh rootfs_overlay_demo/etc/mender/mender.conf

Also I can not see, if you are running mender-convert or docker-mender-convert? Probably would recommend the second one.

Hi your command gives me the following output:

-rw------- 1 root wheel 846B Dec 15 17:54 rootfs_overlay_demo/etc/mender/mender.conf

I’m running docker-mender-convert with:

MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert \
    --disk-image input/golden-image-1.img \
    --config configs/raspberrypi4_config \
    --overlay rootfs_overlay_demo/

I had to modify bootstrap-rootfs-overlay-hosted-server.sh as given here and here to get mender.conf. Perhaps the code that sets permissions for mender.conf there needs to be modified?

I can not access the provided links, but is it similar to what is done here ?

Yes! Except I used 0 instead of root. I’ve also updated my earlier links. Any ideas on what the problem might be?

SOLVED: You have to use sudo chmod on mender.conf in usr/local/bin instead of the mender-convert directory.