Hello, this is a known problem upstream, where torrentzip will change permissions of the file it compresses, even locking itself out of being able to write a file. Currently I must use wine + torrentzip, which is less than ideal. I'm not a C programmer, so would someone please look over this patch, taken from FreeBSD, and see if it fixes the problem? tyvm! Also see: https://sourceforge.net/tracker/index.php?func=detail&aid=1415549&group_id=135285&atid=732451 and: File permissions on Linux have different names: rename all instances of 'S_ISTXT' in the patch to 'S_ISVTX' and trrntzip will then compile. --- src/trrntzip.c-orig Mon May 2 08:38:40 2005 +++ src/trrntzip.c Sat May 7 02:51:55 2005 @@ -716,7 +716,7 @@ if (dirp) { - // First set all the files to read-only. This is so we can skip + // First set the sticky bit on all files. This is so we can skip // our new zipfiles if they are returned by readdir() a second time. while (direntp = readdir (dirp)) { @@ -732,7 +732,7 @@ if (strstr (szTmpBuf, ".zip\0")) { - chmod (direntp->d_name, S_IRUSR); + chmod (direntp->d_name, istat.st_mode | S_ISTXT); } } // Zip file is actually a dir @@ -780,9 +780,9 @@ sprintf (szTmpBuf, "%s", direntp->d_name); strlwr (szTmpBuf); - if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR)) + if (strstr (szTmpBuf, ".zip\0") && (istat.st_mode & S_ISTXT)) { - chmod (direntp->d_name, S_IWUSR); + chmod (direntp->d_name, istat.st_mode & ~S_ISTXT); mig.cEncounteredZips++; if (!mig.fProcessLog) Reproducible: Always
The provided patch does not compile. Try this - it seems to work for me : --- src/trrntzip.c-orig Mon May 2 08:38:40 2005 +++ src/trrntzip.c Sat May 7 02:51:55 2005 @@ -780,9 +780,9 @@ sprintf (szTmpBuf, "%s", direntp->d_name); strlwr (szTmpBuf); if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR)) { - chmod (direntp->d_name, S_IWUSR); + chmod (direntp->d_name, S_IWUSR | S_IRUSR); mig.cEncounteredZips++; if (!mig.fProcessLog)
Thank you, that seems to do the trick! I'll continue testing. The patch that applies neatly is: --- src/trrntzip.c +++ src/trrntzip.c @@ -782,7 +782,7 @@ if (strstr (szTmpBuf, ".zip\0") && !(istat.st_mode & S_IWUSR)) { - chmod (direntp->d_name, S_IWUSR); + chmod (direntp->d_name, S_IWUSR | S_IRUSR); mig.cEncounteredZips++; if (!mig.fProcessLog)
Fixed, thanks