you get a shell inside the snap environment to try out how that bound file behaves … note that if you want to use an existing file shipped in your snap you want to use an install hook to first copy the original file to $SNAP_DATA/etc/foo.ini
Thanks @ogra.
I found the problem. I am using Qt and QSettings to read and write this file but when I call QSettings::sync() it gives a AccessError while this does not happen with QFile and it is ok.