Index: main/asterisk.c =================================================================== --- main/asterisk.c (revision 190091) +++ main/asterisk.c (working copy) @@ -2951,6 +2951,16 @@ ast_log(LOG_WARNING, "Unable to set the process for core dumps after changing to a non-root user. %s\n", strerror(errno)); } } + + { + char dir[PATH_MAX]; + if (eaccess(getcwd(dir, sizeof(dir)), R_OK | X_OK | F_OK)) { + ast_log(LOG_ERROR, "Unable to access the running directory (%s). Changing to '/' for compatibility.\n", strerror(errno)); + if (chdir("/")) { + ast_log(LOG_ERROR, "chdir() failed?!! %s\n", strerror(errno)); + } + } + } #endif ast_term_init();