cwilper wrote:
Hi Dominic and Andrew,
I've also been setting up archfs over samba and found this post helpful. The
final problem is actually that the st_nlink information is reported incorrectly
(always zero) to fuse by archfs. This causes samba clients to get confused.
You can fix it by modifying revisions.c, starting at line 15.
Replace this:
if (stats->type == S_IFDIR)
stbuf->st_mode = stats->type | 0555;
else
stbuf->st_mode = stats->type | 0444;
stbuf->st_nlink = stats->nlink;
With this:
if (stats->type == S_IFDIR) {
stbuf->st_mode = stats->type | 0555;
stbuf->st_nlink = 2;
} else {
stbuf->st_mode = stats->type | 0444;
stbuf->st_nlink = 1;
}
Admittedly, this is a hack because I don't understand the real cause of the
problem in the code. But as long as directories are reported to have at least
two links and files one, my samba client is happy.
Thanks Chris! That works well for me too. As your code did not come out
too good in the posting I give it below in (hopefully) clearer form, for
anyone else who wants to use it.
Dominic
if (stats->type == S_IFDIR) {
stbuf->st_mode = stats->type | 0555;
stbuf->st_nlink = 2;
} else {
stbuf->st_mode = stats->type | 0444;
stbuf->st_nlink = 1;
}
_______________________________________________
rdiff-backup-users mailing list at [email protected]
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki