public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* "cannot create hard link X to Y: Operation not permitted" on ext2fsd-mounted ext2 drive from cygwin cp -al
@ 2015-03-26 15:37 Kevin Field
  2015-03-26 19:12 ` Andrey Repin
  2015-03-30 12:36 ` Corinna Vinschen
  0 siblings, 2 replies; 3+ messages in thread
From: Kevin Field @ 2015-03-26 15:37 UTC (permalink / raw)
  To: cygwin

Hi everyone.

This is a cross-post from SuperUser.com .  If you're a StackExchange 
member please feel free to answer it at 
http://superuser.com/questions/894015/cannot-create-hard-link-x-to-y-operation-not-permitted-on-ext2-drive-from-cyg

In one comment you'll see there, someone has proposed that cygwin will 
only try NTFS hardlinks, even if the mounted drive is ext2 via ext2fsd. 
  Maybe someone here could confirm that, or if it's not true...help me 
find a solution :)  Thanks, -Kev

-------------------

/cygdrive/d/ is a USB hard disk formatted as ext2 and mounted with 
[ext2fsd][1].

When I try `cp -al /cygdrive/d/X /cygdrive/d/Y` where X is a file, I get 
the error in the title.

Things I've Tried/Verified
---

I did `chmod -R 777 /cygdrive/d` but I still get the same result.

I am running as local administrator, who is the owner of /cygdrive/d.

X is a file, not a directory.

Windows Server 2012 R2 running cygwin64 current as of today.

It's ext2 because I can, for example, `touch 
/cygdrive/d/filename_with_a_colon:in_it` and it works and I can see it 
with `ls`.  Not to mention, it says so in ext2fsd and the Windows Disk 
Manager.

Ironically, the same syntax on an NTFS drive works fine and creates an 
NTFS hardlink.

I've also tried reformatting the drive as ext3, with the same results. 
I *had* figured on ext2 being more likely to be fully supported on 
account of it being older than ext3/4, but I guess it doesn't make a 
difference.

The question
--

How can I create simple ext2 hardlinks with cygwin?


   [1]: http://www.ext2fsd.com/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "cannot create hard link X to Y: Operation not permitted" on   ext2fsd-mounted ext2 drive from cygwin cp -al
  2015-03-26 15:37 "cannot create hard link X to Y: Operation not permitted" on ext2fsd-mounted ext2 drive from cygwin cp -al Kevin Field
@ 2015-03-26 19:12 ` Andrey Repin
  2015-03-30 12:36 ` Corinna Vinschen
  1 sibling, 0 replies; 3+ messages in thread
From: Andrey Repin @ 2015-03-26 19:12 UTC (permalink / raw)
  To: Kevin Field, cygwin

Greetings, Kevin Field!

> /cygdrive/d/ is a USB hard disk formatted as ext2 and mounted with
> [ext2fsd][1].

> When I try `cp -al /cygdrive/d/X /cygdrive/d/Y` where X is a file, I get 
> the error in the title.

> Things I've Tried/Verified
> ---

> I did `chmod -R 777 /cygdrive/d` but I still get the same result.

> I am running as local administrator, who is the owner of /cygdrive/d.

> X is a file, not a directory.

> Windows Server 2012 R2 running cygwin64 current as of today.

> It's ext2 because I can, for example, `touch 
> /cygdrive/d/filename_with_a_colon:in_it` and it works and I can see it 
> with `ls`.  Not to mention, it says so in ext2fsd and the Windows Disk 
> Manager.

> Ironically, the same syntax on an NTFS drive works fine and creates an 
> NTFS hardlink.

> I've also tried reformatting the drive as ext3, with the same results. 
> I *had* figured on ext2 being more likely to be fully supported on 
> account of it being older than ext3/4, but I guess it doesn't make a 
> difference.

> The question
> --

> How can I create simple ext2 hardlinks with cygwin?

/lib/csih/getVolInfo.exe /cygdrive/d

?

>    [1]: http://www.ext2fsd.com/


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 26.03.2015, <21:59>

Sorry for my terrible english...


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: "cannot create hard link X to Y: Operation not permitted" on ext2fsd-mounted ext2 drive from cygwin cp -al
  2015-03-26 15:37 "cannot create hard link X to Y: Operation not permitted" on ext2fsd-mounted ext2 drive from cygwin cp -al Kevin Field
  2015-03-26 19:12 ` Andrey Repin
@ 2015-03-30 12:36 ` Corinna Vinschen
  1 sibling, 0 replies; 3+ messages in thread
From: Corinna Vinschen @ 2015-03-30 12:36 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 2386 bytes --]

On Mar 26 08:53, Kevin Field wrote:
> Hi everyone.
> 
> This is a cross-post from SuperUser.com .  If you're a StackExchange member
> please feel free to answer it at http://superuser.com/questions/894015/cannot-create-hard-link-x-to-y-operation-not-permitted-on-ext2-drive-from-cyg
> 
> In one comment you'll see there, someone has proposed that cygwin will only
> try NTFS hardlinks, even if the mounted drive is ext2 via ext2fsd.  Maybe
> someone here could confirm that, or if it's not true...help me find a
> solution :)  Thanks, -Kev
> 
> -------------------
> 
> /cygdrive/d/ is a USB hard disk formatted as ext2 and mounted with
> [ext2fsd][1].
> 
> When I try `cp -al /cygdrive/d/X /cygdrive/d/Y` where X is a file, I get the
> error in the title.
> 
> Things I've Tried/Verified
> ---
> 
> I did `chmod -R 777 /cygdrive/d` but I still get the same result.
> 
> I am running as local administrator, who is the owner of /cygdrive/d.
> 
> X is a file, not a directory.
> 
> Windows Server 2012 R2 running cygwin64 current as of today.
> 
> It's ext2 because I can, for example, `touch
> /cygdrive/d/filename_with_a_colon:in_it` and it works and I can see it with
> `ls`.  Not to mention, it says so in ext2fsd and the Windows Disk Manager.
> 
> Ironically, the same syntax on an NTFS drive works fine and creates an NTFS
> hardlink.
> 
> I've also tried reformatting the drive as ext3, with the same results. I
> *had* figured on ext2 being more likely to be fully supported on account of
> it being older than ext3/4, but I guess it doesn't make a difference.
> 
> The question
> --
> 
> How can I create simple ext2 hardlinks with cygwin?

Does ext2fsd support creating hardlinks?  The reason I'm asking is that
Cygwin does not create hardlinks out of the blue.  It certainly doesn't
communicate with a driver directly.  It just calls the underlying system
call NtSetInformationFile(FileLinkInformation).  If that doesn't work,
neither Cygwin nor any other Windows applications have a chance to
create a hardlink.

Alternatively, does the CMD.exe `mklink /h' call work?  If so, ext2fsd
requires another set of flags to create hardlinks than NTFS, apparently.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-30 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 15:37 "cannot create hard link X to Y: Operation not permitted" on ext2fsd-mounted ext2 drive from cygwin cp -al Kevin Field
2015-03-26 19:12 ` Andrey Repin
2015-03-30 12:36 ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).