Mail Archives: cygwin/2000/09/18/18:49:00
On Mon, Sep 18, 2000 at 03:53:43PM -0400, Tweedy, Laura wrote:
>I am running into permission problems with ln -f. I have a file that
>is read-only and I want it to remain so. I am making a hard link to
>it in another location. This link is done in a makefile which uses
>ln -f to make the link. The link works fine, but if making the target
>requires that it be removed first, the permissions become read-write.
I don't see an easy way around this. The file system semantics for
Windows are different from UNIX. On UNIX, you can unlink a file which
has read only permission. AFAIK, you can't do that on Windows without
first changing the permissions of the file.
So, if you change the permissions to unlink a file you also change the
permissions of any files hard linked to that file, just like UNIX. The
problem is that there is no way of knowing (or at least I don't know how
to find out) which files are linked to the file that you're deleting.
Like I said, I don't see any easy way around this problem but if someone
has a solution, please post it here.
cgf
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -