diff --git a/src/csync_time.c b/src/csync_time.c index 909a65e88..ae1d24b7d 100644 --- a/src/csync_time.c +++ b/src/csync_time.c @@ -47,10 +47,12 @@ time_t csync_timediff(CSYNC *ctx) { ctx->replica = ctx->remote.type; dp = csync_vio_opendir(ctx, ctx->remote.uri); if (dp == NULL) { - if (csync_vio_mkdir(ctx, ctx->remote.uri, 0755) < 0) { - CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Unable to create directory on remote uri: %s - %s", luri, strerror(errno)); - return -1; - } + /* + * To prevent problems especially with pam_csync we shouldn't try to create the + * remote directory here. Just fail! + */ + CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Access dienied to remote uri: %s - %s", ctx->remote.uri, strerror(errno)); + return -1; } csync_vio_closedir(ctx, dp);