Bug 24390

Summary: ln(1) Replacing old dir-symlinks when using /bin/ln
Product: Base System Reporter: Espen Skoglund <esk>
Component: binAssignee: freebsd-standards (Nobody) <standards>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.2-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Espen Skoglund 2001-01-16 18:50:01 UTC
I'm wondering about the semantics of the replacement functionality in `ln'
when the file to be replaced is a symlink to a directory.  I would have
thought that this should behave in the same manner as if the target of
`ln' was a normal file (i.e., the old symlink would be deleted, and a new
link would be installed).  This is, however, not the case.  What happens
is that `ln' follows the symlink into the directory and tries to install
a symlink there instead.  Is this really the desired behaviour?

How-To-Repeat: 
; mkdir foo
; chmod a-w foo
; ln -sf foo bar
; ln -sf foo bar
ln: bar/foo: Permission denied
Comment 1 Kris Kennaway freebsd_committer freebsd_triage 2003-07-13 07:25:01 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-standards

Assign to standards group to determine correct behaviour
Comment 2 Jilles Tjoelker freebsd_committer freebsd_triage 2010-04-20 20:45:45 UTC
State Changed
From-To: open->closed

Duplicate of standards/41576