Permissions of alsatplg -o output are hardcoded to S_IRUSR | S_IWUSR (600)
alsa-project/alsa-utils issue #126 was opened from marc-hb:
Quoted 1 line
From https://github.com/alsa-project/alsa-utils/blob/c8c348e28a258f17e3/topology/topology.c#L172
```C
static int save(const char *output_file, void *buf, size_t size)
{
fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
```When using alsatplg in a build system (e.g.: https://github.com/thesofproject/sof/blob/3e1c160e5053eae/tools/topology/topology1/CMakeLists.txt#L243), all other artefacts follow the process's umask **except** alsatplg output. This causes subtle and time-consuming errors when trying to share artefacts across different processes.
git blame finds:
commit cbabe7a3f0cc84ecd352d4cbf85148946fa6c0d5
Author: Jaroslav Kysela <[email protected]> Date: Thu Dec 19 15:36:05 2019 +0100
alsatplg: rewrite to use the new libatopology functions
Before cbabe7a3f0, opening the output file was delegated to library function snd_tplg_build_file(). Not sure what permissions were used then.
Workaround:
```shell alsatplg -c intput.conf -o - > output.tplg ```
Issue URL : https://github.com/alsa-project/alsa-utils/issues/126
Repository URL: https://github.com/alsa-project/alsa-utils