Skip Menu |

This queue is for tickets about the File-Copy-Recursive CPAN distribution.

Report information
The Basics
Id: 75112
Status: resolved
Priority: 0/
Queue: File-Copy-Recursive

People
Owner: Nobody in particular
Requestors: nick.cpan [...] xlmt.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.38
Fixed in: (no value)



Subject: dircopy fails if source directory is read only
Trying to copy from a read only directory to a non existent new directory fails. I am running this on Linux, Ubuntu 11.10 with File::Copy::Recursive v0.38. The new destination directory is created, but inherits read only permissions from the source directory before the rest of the files have been copied. Consequently, copying the rest of the source files into the newly created destination directory fails with 'permission denied' for example: ~$ ls -lhd /media/cdrom dr-xr-xr-x 1 root root 2.0K 2012-02-18 10:35 /media/cdrom dircopy('/media/cdrom', '/tmp/destination') will fail with 'Permission Denied'. A workaround, if you are not concerned by maintaining permissions on the copied files is to set: $File::Copy::Recursive::KeepMode = 0; A longer-term fix requires directories to be created with writeable permissions at first, then sync the permissions once we're done copying.
Subject: Re: [rt.cpan.org #75112] dircopy fails if source directory is read only
Date: Sat, 18 Feb 2012 12:24:05 -0600
To: "bug-File-Copy-Recursive [...] rt.cpan.org" <bug-File-Copy-Recursive [...] rt.cpan.org>
From: webmaster [...] simplemood.com
Thanks for the details! Sent from my iPod On Feb 18, 2012, at 7:54 AM, "nick.cpan@xlmt.com via RT" <bug-File-Copy-Recursive@rt.cpan.org> wrote: Show quoted text
> Sat Feb 18 08:54:41 2012: Request 75112 was acted upon. > Transaction: Ticket created by nick.cpan@xlmt.com > Queue: File-Copy-Recursive > Subject: dircopy fails if source directory is read only > Broken in: 0.38 > Severity: Normal > Owner: Nobody > Requestors: nick.cpan@xlmt.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=75112 > > > > Trying to copy from a read only directory to a non existent new > directory fails. > > I am running this on Linux, Ubuntu 11.10 with File::Copy::Recursive > v0.38. > > The new destination directory is created, but inherits read only > permissions from the source directory before the rest of the files have > been copied. > > Consequently, copying the rest of the source files into the newly > created destination directory fails with 'permission denied' > > for example: > ~$ ls -lhd /media/cdrom > dr-xr-xr-x 1 root root 2.0K 2012-02-18 10:35 /media/cdrom > > dircopy('/media/cdrom', '/tmp/destination') will fail with 'Permission > Denied'. > > A workaround, if you are not concerned by maintaining permissions on the > copied files is to set: > $File::Copy::Recursive::KeepMode = 0; > > A longer-term fix requires directories to be created with writeable > permissions at first, then sync the permissions once we're done copying. > >
This should be addressed by https://github.com/drmuey/p5-File-Copy-Recursive/commit/8bf278cb4e132b595d2b3203d1a6af41f2140387 I'd like to write tests for it first though and then see if the TODO works like we'd want.
On Mon Jan 25 15:01:01 2016, DMUEY wrote: Show quoted text
> This should be addressed by https://github.com/drmuey/p5-File-Copy- > Recursive/commit/8bf278cb4e132b595d2b3203d1a6af41f2140387 > > I'd like to write tests for it first though and then see if the TODO > works like we'd want.
It does but we still have an issue as outlined in this commit/commit message, thanks! https://github.com/drmuey/p5-File-Copy-Recursive/commit/7c37db6bc4aeece77fdcb608320527e1ca3527cd