PulseAudio on Cygwin: Failed to create secure directory: Unknown error 13

If the program you are using is not very different from the code in the online repository then it decides to fail on this if:

if (!S_ISDIR(st.st_mode) ||
(st.st_uid != uid) ||
(st.st_gid != gid) ||
((st.st_mode & 0777) != m)) {
errno = EACCES;
goto fail;
}

The function pa_make_secure_dir() which contains the if is being called with these possible combinations of m, uid and gid depending on whether is PA called in system mode (environment variable PULSE_SYSTEM) or not:

  • 0700, -1, -1
  • 0755, -1, -1

uid and gid -1 means that pa_make_secure_dir() will use the current owner of the process.

The fstat() call returns st_mode=0x41F8 it is (after applying the mask) 0770 in octal.

What to try

Try to pre-create the directory /cygdrive/c/Users/Nithin/.pulse with mode 0700 or 0755. You can change it using chmod. Also make sure that the owner and group are the same as you run the PA under.

From the code it looks like that the umask() call did not have the desired effect and fchmod() was not called at all. Is not your home directory on FAT file system or do not you have noacl in /etc/fstab or /etc/fstab.d/$USER? See File permissions.

Note

errno value of 13 is not "Unknown error" but EACCESS - Permission denied. There is probably some problem in translating error codes into strings in pa_cstrerror().