Hi, Isn't there an issue with the order of the chown and chmod calls in gzip.c? The source code is now :
#ifndef NO_CHOWN /* Copy ownership */ # if HAVE_FCHOWN ignore_value (fchown (ofd, ifstat->st_uid, ifstat->st_gid)); # elif HAVE_CHOWN ignore_value (chown (ofname, ifstat->st_uid, ifstat->st_gid)); # endif #endif /* Copy the protection modes */ #if HAVE_FCHMOD r = fchmod (ofd, mode); #else r = chmod (ofname, mode); #endif if (r != 0) { int e = errno; WARN ((stderr, "%s: ", program_name)); if (!quiet) { errno = e; perror(ofname); } } ... but back in version 1.3.5 it was: /* Copy the protection modes */ if (chmod(ofname, ifstat->st_mode & 07777)) { int e = errno; WARN((stderr, "%s: ", progname)); if (!quiet) { errno = e; perror(ofname); } } #ifndef NO_CHOWN chown(ofname, ifstat->st_uid, ifstat->st_gid); /* Copy ownership */ #endif (= chmod 1rst, chown 2nd) We have recently changed servers, thus upgraded from version 1.3.5 to version 1.3.12, and using an "app_user" user we can't compress .pdf files generated by user oracle any longer. See the following example: [wmsfac32@agrwbat3 tmp]$ ll 854FAC16809WtT6Ds6dn.pdf -rw-rw-r-- 1 oracle oinstall 100340 7 août 19:07 854FAC16809WtT6Ds6dn.pdf [wmsfac32@agrwbat3 tmp]$ gzip 854FAC16809WtT6Ds6dn.pdf gzip: 854FAC16809WtT6Ds6dn.pdf.gz: Operation not permitted [wmsfac32@agrwbat3 tmp]$ echo $? 2 [wmsfac32@agrwbat3 tmp]$ ll 854FAC16809WtT6Ds6dn.pdf* -rw------- 1 oracle oinstall 79847 7 août 19:07 854FAC16809WtT6Ds6dn.pdf.gz Isn't this a bug? Best regards. [Description : Description : C:\Documents and Settings\castelain.f\My Documents\My Pictures\Signature-Outlook-avec-logo\logo-stef-info-techno-46.jpg] Frédéric CASTELAIN STEF IT - Service A&D 4 rue de Dôle - 69007 LYON +33 4 72 76 34 49 (poste 449) +33 4 72 76 34 79 NOTICE: This e-mail (including any attachments) may contain information that is private, confidential or legally privileged information or material and is intended solely for the use of the addressee(s). If you receive this e-mail in error, please delete it from your system without copying it and immediately notify the sender(s) by reply e-mail. Any unauthorized use or disclosure of this message is strictly prohibited. STEF does not guarantee the integrity of this transmission and may therefore never be liable if the message is altered or falsified nor for any virus, interception or damage to your system. AVIS : Ce message (y compris toutes pièces jointes) peut contenir des informations privées, confidentielles et est pour l'usage du(es) seul(s) destinataire(s). Si vous avez reçu ce message par erreur, merci d'en avertir l'expéditeur par retour d'email immédiatement et de procéder à la destruction de l'ensemble des éléments reçus, dont vous ne devez garder aucune copie. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le(les) destinataire(s) désigné(s) est interdite. STEF ne garantit pas l'intégrité de cette transmission et ne saurait être tenu responsable du message, de son contenu, de toute modification ou falsification, d’une interception ou de dégâts à votre système.