Skip Menu |

This queue is for tickets about the Net-SFTP-Foreign CPAN distribution.

Report information
The Basics
Id: 75456
Status: resolved
Priority: 0/
Queue: Net-SFTP-Foreign

People
Owner: Nobody in particular
Requestors: hlsc_richard [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.69
  • 1.70_08
Fixed in: (no value)



Subject: Set permissions on local files after 'get' is forced.
Confirmed to exist in Net-SFTP-Foreign-1.69 and Net-SFTP-Foreign-1.70_08. Local system is RHEL 5.7 (kernel 2.6.18-274.17.1.el5) running Perl v5.8.8. Encountered an issue when downloading a file and saving to a CIFS mounted drive which had a forced masks. Being forced the permissions could not be modified after download. Tracked bug to this section of code in the Foreign.pm : 1565 } 1566 1567 if (defined $perm) { 1568 local ($@, $SIG{__DIE__}, $SIG{__WARN__}); 1569 my $e = eval { chmod($perm & $neg_umask, $local) }; Line 1567 will always be true regardless of whether module is called with copy_perm set to 0 or 1. This causes file permissions to be set post-download as a result. A simple fix would be to update as follows: 1565 } 1566 1567 if ( (defined $perm) and ($copy_perm) ) { 1568 local ($@, $SIG{__DIE__}, $SIG{__WARN__}); 1569 my $e = eval { chmod($perm & $neg_umask, $local) }; This ensures that copy_perm is checked to confirm it is set to a 1 and that the end user does in fact which for permissions to be set after download. Hope this helps! Rich
Subject: Re: [rt.cpan.org #75456] Set permissions on local files after 'get' is forced.
Date: Fri, 2 Mar 2012 03:29:24 -0800 (PST)
To: "bug-Net-SFTP-Foreign [...] rt.cpan.org" <bug-Net-SFTP-Foreign [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Show quoted text
----- Original Message -----
> From: Rich Anderson via RT <bug-Net-SFTP-Foreign@rt.cpan.org> > To: > Cc: > Sent: Thursday, March 1, 2012 10:45 PM > Subject: [rt.cpan.org #75456] Set permissions on local files after 'get' is forced. > >T hu Mar 01 16:45:16 2012: Request 75456 was acted upon. > Transaction: Ticket created by biscuit >       Queue: Net-SFTP-Foreign >     Subject: Set permissions on local files after 'get' is forced. >   Broken in: 1.69, 1.70_08 >     Severity: Normal >       Owner: Nobody >   Requestors: hlsc_richard@hotmail.com >       Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=75456 > > > > Confirmed to exist in Net-SFTP-Foreign-1.69 and > Net-SFTP-Foreign-1.70_08.  Local system is RHEL 5.7 (kernel > 2.6.18-274.17.1.el5) running Perl v5.8.8. > > Encountered an issue when downloading a file and saving to a CIFS > mounted drive which had a forced masks.  Being forced the permissions > could not be modified after download.
could you try the new version 1.70_09 that I have just uploaded to CPAN?   https://metacpan.org/release/SALVA/Net-SFTP-Foreign-1.70_09
Subject: Re: [rt.cpan.org #75456] Set permissions on local files after 'get' is forced.
Date: Fri, 2 Mar 2012 04:50:13 -0800 (PST)
To: "bug-Net-SFTP-Foreign [...] rt.cpan.org" <bug-Net-SFTP-Foreign [...] rt.cpan.org>
From: Salvador Fandino <sfandino [...] yahoo.com>
Show quoted text
>> Encountered an issue when downloading a file and saving to a CIFS >> mounted drive which had a forced masks.  Being forced the permissions >> could not be modified after download.
> > could you try the new version 1.70_09 that I have just uploaded to CPAN?
I have done some refactoring of the permissions handling code inside the get method and released 1.70_10:   https://metacpan.org/release/SALVA/Net-SFTP-Foreign-1.70_10
presumibly solved. If this is not the case, feel free to reopen the ticket.