Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion freshclam/manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -1300,6 +1300,7 @@ getfile_mirman (const char *srcfile, const char *destfile,
if (write (fd, buffer, bread) != bread)
{
logg ("getfile: Can't write %d bytes to %s\n", bread, destfile);
logg ("getfile: %s\n", strerror (errno));
close (fd);
unlink (destfile);
return FCE_DBDIRACCESS;
Expand Down Expand Up @@ -2783,7 +2784,11 @@ downloadmanager (const struct optstruct *opts, const char *hostname,
if (mkdir (updtmpdir, 0755))
{
logg ("!Can't create temporary directory %s\n", updtmpdir);
logg ("Hint: The database directory must be writable for UID %d or GID %d\n", getuid (), getgid ());
logg ("!%s\n", strerror (errno));
if (errno == EACCES)
{
logg ("Hint: The database directory must be writable for UID %d or GID %d\n", getuid (), getgid ());
}
return FCE_DBDIRACCESS;
}

Expand Down
3 changes: 2 additions & 1 deletion shared/output.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ int logg(const char *str, ...)
#ifdef CL_THREAD_SAFE
pthread_mutex_unlock(&logg_mutex);
#endif
printf("ERROR: Can't open %s in append mode (check permissions!).\n", logg_file);
printf("ERROR: Can't open %s in append mode.\n", logg_file);
printf("ERROR: %s\n", strerror (errno));
if(len > sizeof(buffer))
free(abuffer);
return -1;
Expand Down