Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win32: cannot create hard links on mounted network share #7963

Closed
p5pRT opened this issue Jun 9, 2005 · 8 comments
Closed

Win32: cannot create hard links on mounted network share #7963

p5pRT opened this issue Jun 9, 2005 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 9, 2005

Migrated from rt.perl.org#36232 (status was 'open')

Searchable as RT36232$

@p5pRT
Copy link
Author

p5pRT commented Jun 9, 2005

From mkoeppe@gmx.de

This is a bug report for perl from mkoeppe@gmx.de,
generated with the help of perlbug 1.35 running under perl v5.8.6.

With ActivePerl 5.8.6.811, creating a hard link on a local NTFS formatted
drive (Win2000) works as expected, but it fails on a mounted network share
(Win2003 server, of course the underlying filesystem is NTFS, too).

The hardlink can be created independantly of ActivePerl with Interix tools,
however, on both the local disk and on the mounted share as well.

Perl 5.8.7 doesn't fix this.

More details and a suggestion for a fix can be found on ActiveState's
bug number 39027 at
http://bugs.activestate.com/show_bug.cgi?id=39027

I first reported it there, but then found, that the responsible source
code can be found within
http://www.cpan.org/src/stable.tar.bz2
so it might not be solely related to ActiveState.

Perl Info
---
Flags:
category=core
severity=low
---
Site configuration information for perl v5.8.6:

Configured by ActiveState at Mon Dec 13 09:51:32 2004.

Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -Gf -W3 -MD -Zi -DNDEBUG -O1 -DWIN32
-D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-DPERL_MSVCRT_READFIX',
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"C:\Perl\lib\CORE" -machine:x86'
libpth=\lib
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
msvcrt.lib
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib
uuid.libws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib
msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
gnulibc_version='undef'
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86'

Locally applied patches:
ACTIVEPERL_LOCAL_PATCHES_ENTRY
21540 Fix backward-compatibility issues in if.pm
23565 Wrong MANIFEST.SKIP

---
@INC for perl v5.8.6:
C:/Perl/lib
C:/Perl/site/lib
.

---
Environment for perl v5.8.6:
HOME (unset)
LANG (unset)
LANGUAGE (unset)
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
LOGDIR (unset)

PATH=C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;C:\SFU\common\;C:\SFU\Perl\bin\
PERL_BADLANG (unset)
SHELL (unset)

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2005

From @smpeters

Have you tried the module Win32​::Hardlink?

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2005

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 21, 2005

From mkoeppe@gmx.de

No, I didn't know of it. I now looked at it (especially at the C source
of it) and I think it's more or less useless, as it duplicates the
functionality of the already builtin 'link' on Win32.
Both use the Win32 API function CreateHardLink, but this is the problem!
Read my ActivePerl bug report 39027 for more details.

Martin

@toddr
Copy link
Member

toddr commented Feb 13, 2020

Given the suggested fix is no longer accessible, I suggest closing this. It certainly sounds like a CPAN fix if nothing else.

@toddr toddr added the Closable? We might be able to close this ticket, but we need to check with the reporter label Feb 13, 2020
@richardleach
Copy link
Contributor

NTFS hard links under modern Windows are specifically same-volume only: https://docs.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions

Perl should not be able to create a cross-volume hard link via the Windows API nowadays, so there's no action here to take.

@toddr
Copy link
Member

toddr commented Feb 13, 2020

Thank you!

@toddr toddr closed this as completed Feb 13, 2020
@toddr toddr removed the Closable? We might be able to close this ticket, but we need to check with the reporter label Feb 13, 2020
@toddr
Copy link
Member

toddr commented Feb 13, 2020

@richardleach thanks. the close button should be available to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants