Skip Menu |

This queue is for tickets about the IO-Compress CPAN distribution.

Report information
The Basics
Id: 80855
Status: resolved
Priority: 0/
Queue: IO-Compress

People
Owner: Nobody in particular
Requestors: quanah.gibsonmount [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 2.052
  • 2.055
Fixed in: 2.057



Subject: IO::Compress::Base::Common returns that it cannot read readable files in NFS
In the function: 359 sub IO::Compress::Base::Validator::validateInputFilenames The "-r" flag is used to see if the input file is readable: 380 if (! -r _ ) 381 { 382 return $self->saveErrorString("cannot open file '$filename': $!"); 383 } However, as noted in the perl documentation, this call is not reliable: The interpretation of the file permission operators -r , -R , -w , -W , -x , and -X is by default based solely on the mode of the file and the uids and gids of the user. There may be other reasons you can't actually read, write, or execute the file: for example network filesystem access controls, ACLs (access control lists), read-only filesystems, and unrecognized executable formats. Note that the use of these six specific operators to verify if some operation is possible is usually a mistake, because it may be open to race conditions. This causes problems when trying to use IO::Compress to compress files stored in NFS that may be fully accessible to the reader making the call, but not have a matching UID. Example: zimbra@mail:~$ ./libexec/zmbackupldap --outdir /backup/qtest --zip gzip failed: cannot open file '/backup/qtest/ldap.bak': zimbra@mail:~$ ls -l /backup/qtest/ total 848 -rw-r----- 1 99 99 641551 Nov 7 2012 ldap-config.bak -rw-r----- 1 99 99 224569 Nov 7 2012 ldap.bak zimbra@mail:~$ cd /backup/qtest/ zimbra@mail:/backup/qtest$ gzip ldap.bak zimbra@mail:/backup/qtest$ ls -l total 680 -rw-r----- 1 99 99 641551 Nov 7 18:38 ldap-config.bak -rw-r----- 1 99 99 52855 Nov 7 18:38 ldap.bak.gz
Thanks for the bug report. Interesting that nobody has reported this issue before. I'll either change thge code to use the "filtest" pragma, or just remove the test completely. Paul
On Thu Nov 08 15:08:09 2012, PMQS wrote: Show quoted text
> Thanks for the bug report. > > Interesting that nobody has reported this issue before. > > I'll either change thge code to use the "filtest" pragma, or just remove > the test completely.
Thanks Paul! This is the first time we've had a customer hit this issue as well. --Quanah
On Thu Nov 08 20:51:14 2012, MISHIKAL wrote: Show quoted text
> On Thu Nov 08 15:08:09 2012, PMQS wrote:
> > Thanks for the bug report. > > > > Interesting that nobody has reported this issue before. > > > > I'll either change thge code to use the "filtest" pragma, or just remove > > the test completely.
> > Thanks Paul! This is the first time we've had a customer hit this issue > as well.
Uploaded a new version of IO-Compress (2.057) to CPAN that should hopefully sort this issue. Please get back to me if there are any issues with it. Paul
On Sun Nov 11 17:06:49 2012, PMQS wrote: Show quoted text
> Uploaded a new version of IO-Compress (2.057) to CPAN that should > hopefully sort this issue. > > Please get back to me if there are any issues with it.
Thanks Paul. I tested on the client's server, and it worked perfectly. :) --Quanah
On Mon Nov 12 13:51:50 2012, MISHIKAL wrote: Show quoted text
> On Sun Nov 11 17:06:49 2012, PMQS wrote:
> > Uploaded a new version of IO-Compress (2.057) to CPAN that should > > hopefully sort this issue. > > > > Please get back to me if there are any issues with it.
> > Thanks Paul. I tested on the client's server, and it worked perfectly. :)
Excellent. Paul