bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug with move


From: Bob Proulx
Subject: Re: Bug with move
Date: Sat, 4 May 2002 15:36:03 -0600

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>

In the future when posting messages to mailing lists it would be most
appreciated if you sent your message in plain text format.  HTML mail
is not appreciated.

  http://www.expita.com/nomime.html

> <DIV><FONT face=Arial size=2>I am using the Red Hat Linux release
> 7.1 (Seawolf), Kernel 2.4.2-2smp on a 2-processor i586.</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT
> face=Arial size=2>I tried to move a file called "appendtape.sh"
> owned by root to another file "appendtape.sh.tmp" when I logged in
> as myself ( not root ). I also belong to backup group ( as shown by
> the permissions below ).  This file "appendtape.sh" is placed in my
> home directory.</FONT></DIV>

Thanks for your report.  But I am confident that what you are seeing
is merely confusion about unix filesystem permissions and not a bug.
This is concluded primarily because you did not include the ls listing
of the directory and it is the directory permissions that controls
whether you can create, remove or rename files in a directory.

Run 'ls -ld' on the directory and I am sure you will find that you had
permissions capable of removing files there.

> <DIV><FONT face=Arial size=2>Please let us know if this report is
> correct and how this needs to be fixed. We would be interested in
> knowing the fix.</FONT></DIV>

If you change the permissions of the directory then you can control
who can create, remove or rename files within the directory.  Assuming
that the directory is owned by root then the following command will
restrict to only allowing root to create, remove or rename files
there.

  chmod go-w .

Bob

> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Following is the file and the related 
> permissions.</FONT></DIV>
> <DIV><FONT face=Arial size=2>-rw-r--r--&nbsp;&nbsp;&nbsp; 1 
> root&nbsp;&nbsp;&nbsp;&nbsp; backup&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2231 
> Apr 
> 30 23:49 appendtape.sh</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Following is the command</FONT></DIV>
> <DIV><FONT face=Arial size=2>$mv appendtape.sh appendtape.sh.tmp</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>This operation should have failed since no one 
> other than the owner ( in this case root ) should be permitted to move this 
> file. However, this command was successful. We feel that this should not have 
> happened and hence, it is a bug. </FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>We tried the same experiment on SVR4 and 
> Unixware 
> Operating Systems where it failed. </FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Please let us know if this report is correct and 
> how this needs to be fixed. We would be interested in knowing the 
> fix.</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Please acknowledge this mail.</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2>Thanks and Regards<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
> -Manjusha</FONT></DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]