• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Hard linked files cannot be modified
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hard linked files cannot be modified


  • Subject: Re: Hard linked files cannot be modified
  • From: Prady K <email@hidden>
  • Date: Wed, 16 Nov 2005 16:12:36 -0800

Hi

Thanks everyone for the information. Actually I cannot use soft links
for what I am trying to do. Somehow the hard links seemed to work but
I guess it is out of question now because of these issues.

--
Thanks
Prady

On 11/16/05, Bill Wagner <email@hidden> wrote:
> There are several things going on:
>
> 1. Your ownership is UID=admin, GROUP=admin. Unless you're logging in as
> a user called "admin" any application that checks ownership may decide
> to disallow over writing, whereas others may ask you for a password. I
> believe this is application specific, but it may also be part of the
> lower level policies used by OS X compliant applications. Become root or
> admin and change the ownership and group so they match yours and I
> suspect it will work.
> 2. The same holds true for your editors. How the editor handles a link
> is likely embedded in the code for the editor itself. Even the "ln"
> commnand has some options that allow it to overwrite or back up links.
>
> Why don't you use soft links instead of hard links???
>
> Bill Wagner
>
>
>
>
> Prady K wrote:
> > Hi
> >
> > Apologies if this posting is out of the scope of this mailing list.  But
> > I could not find any better mailing list to post this.
> >
> > I have a sort of newbie question about hard links to a file. I create  a
> > hard link to image file using ln. After this I cannot modify the
> > original file in Preview or any other application for that matter.  The
> > Preview app in OS X just says document cannot be saved. After  that even
> > after I unlink the file the original file also cannot be  modified at
> > all. I understand the concept of the link but I am  wondering why it is
> > not allowing to modify the files that have being  hard linked.
> >
> > However if I type a text file using vi editor and then create a hard
> > link to that file and then open the file using the link and edit it
> > using TextEdit or vi it saves the file but it breaks the hard link.
> > i.e. the link count becomes 1.
> >
> > Before ln
> > =======
> > -rw-r--r--    1 admin  admin       20 Nov 16 00:25 test.txt
> >
> > After ln
> > =======
> > -rw-r--r--    2 admin  admin       20 Nov 16 00:25 test.txt
> > -rw-r--r--    2 admin  admin       20 Nov 16 00:25 testlink.txt
> >
> > After editing testlink.txt in TextEdit
> > =======
> > -rw-r--r--    1 admin  admin       20 Nov 16 00:25 test.txt
> > -rw-r--r--    1 admin  admin       27 Nov 16 00:26 testlink.txt
> >
> > TIA
> > Prady K
> >
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Unix-porting mailing list      (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
> >
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Hard linked files cannot be modified
      • From: John Stiles <email@hidden>
References: 
 >Hard linked files cannot be modified (From: Prady K <email@hidden>)

  • Prev by Date: Re: Displaying image and core data
  • Next by Date: Re: Displaying image and core data
  • Previous by thread: Hard linked files cannot be modified
  • Next by thread: Re: Hard linked files cannot be modified
  • Index(es):
    • Date
    • Thread