tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* OSF1V5.1 has a bug in advfs or mv command
@ 2003-03-21 14:06 Maarten LITMAATH
  2003-03-21 20:04 ` UPDATE: " Maarten LITMAATH
  0 siblings, 1 reply; 2+ messages in thread
From: Maarten LITMAATH @ 2003-03-21 14:06 UTC (permalink / raw)


Dear Tru64 Managers,
please have a look at the little example below; the permissions on file
"foo.txt" should _not_ prevent the "mv" from succeeding.
This works fine on other UNIX file system types.
The bug can cause scripts etc. to fail where they used to work fine
(that is more or less how I discovered it).
Regards,
         Maarten.Litmaath@cern.ch

---------------------------------------------------------------------------
 > cd /tmp
 > df .
Filesystem          512-blocks        Used   Available Capacity  Mounted on
temp_domain#clutmp    14000000       86496    13913504     1%    /clutmp
 > mount | grep /clutmp
temp_domain#clutmp on /clutmp type advfs (rw)
 >
 > date > foo.txt
 > date > bar.txt
 > chmod 444 foo.txt
 > mv foo.txt bar.txt
mv: cannot unlink foo.txt: Permission denied
 > rm foo.txt bar.txt
rm: override protection 444 for foo.txt? y
 >
---------------------------------------------------------------------------



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

* UPDATE: OSF1V5.1 has a bug in advfs or mv command
  2003-03-21 14:06 OSF1V5.1 has a bug in advfs or mv command Maarten LITMAATH
@ 2003-03-21 20:04 ` Maarten LITMAATH
  0 siblings, 0 replies; 2+ messages in thread
From: Maarten LITMAATH @ 2003-03-21 20:04 UTC (permalink / raw)


Dear Tru64 Managers,
as usual this list has excellent response time: first reply in 4 min!

Here is the relevant part of the example I sent earlier:

--------------------------------------------
 > date > foo.txt
 > date > bar.txt
 > chmod 444 foo.txt
 > mv foo.txt bar.txt
mv: cannot unlink foo.txt: Permission denied
--------------------------------------------

First of all, our exact version is 5.1a with PK3.

Second, the "mv" is not an alias, just /bin/mv.

Third, here is the relevant portion of the system call trace from the
"truss" command:

------------------------------------------------------------------------
stat("bar.txt", 0x000000011FFF5B58)             = 0
stat("bar.txt", 0x000000011FFF5B58)             = 0
stat("foo.txt", 0x000000011FFF5B58)             = 0
lstat("foo.txt", 0x000000011FFF5268)            = 0
lstat("bar.txt", 0x000000011FFF5128)            = 0
access("bar.txt", F_OK)                         = 0
access("bar.txt", W_OK)                         = 0
access("foo.txt", W_OK)                         Err#13 Permission denied
------------------------------------------------------------------------

Fourth, let me already thank the people who responded so-far:

	Lucien HERCAUD     - confirmed bug on 5.1a PK1
	Daniel Lungu
	Bryan Lavelle (HP) - bug not found on 5.1a PK1, PK4
	Gregg Palmer
	Joe Senulis        - confirmed bug on 5.1a PK3
	Bob Sloane
	Didier Godefroy

So we have a bit of a weird situation: at the same OS level some people
have the bug, others do not.  The behavior in the example _is_ a bug,
because the absence of write permission for the source file is irrelevant
for the "mv" to succeed (and indeed, a "mv -f" works fine).
I will post a summary when a resolution has been arrived at.
Regards,
		Maarten.Litmaath@cern.ch



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

end of thread, other threads:[~2003-03-21 20:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-21 14:06 OSF1V5.1 has a bug in advfs or mv command Maarten LITMAATH
2003-03-21 20:04 ` UPDATE: " Maarten LITMAATH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox