Override prompt when deleting a file

Micah micahjon at ywave.com
Fri Nov 18 18:34:17 GMT 2005


Robert Ftizpatrick wrote:
> On Fri, 2005-11-18 at 10:31 -0600, Kevin Kinsey wrote:
> 
>>>>>>>>I'm logged in to my FreeBSD 5.2.1 box as 'admin' via ssh, why would I
>>>>>>>>receive this override prompt?
>>>>>>>>
>>>>>>>>-bash-2.05b$ ls -la massage.xls
>>>>>>>>-rw-r--r--  1 admin  admin  4463104 Aug 29 17:25 massage.xls
>>>>>>>>-bash-2.05b$ rm massage.xls
>>>>>>>>override rw-r--r--  admin/admin for massage.xls?
>>>>>>>>   
>>>>>>>>           
>>>>>>>>
>>>>>>>
>>>>>>>Check the permissions on the directory?
>>>>>>>         
>>>>>>>
>>>>>>
>>>>>>-bash-2.05b$ ls -la
>>>>>>total 460441
>>>>>>drwxr-xr-x  18 admin  admin       1024 Nov 18 08:38 .
>>>>>>drwxr-xr-x   5 admin  admin        512 Jan  4  2005 ..
>>>>>>
>>>>>>       
>>>>>>
>>>>
>>>>To original poster: is the immutable bit set on the file?
>>>>   
>>>>
>>>
>>>I don't believe so...is this how you tell?
>>>
>>>-bash-2.05b$ ls -lo massage.xls
>>>-rw-r--r--  1 admin  admin  - 4463104 Aug 29 17:25 massage.xls
>>> 
>>>
>>
>>see chflags(1).  Most likely it is.  If you really want the file gone,
>>(as root*):
>>
>>#chflags noschg massage.xls
>>#rm massage.xls
>>
> 
> 
> I'm sure I can make it happen. My problem is the rsync backup everynight
> fails to delete this and other files like it saying 'Permission denied'.
> So, I am assuming it is because of this issue. The rsync script logs in
> as admin. How can I resolve this?
> 
> --
> Robert

If you clear the immutable bit (as root), rsync (as admin) should be 
able to remove the file as normal.  You'll just have to figure out why 
the files are immutable in the first place.  You may just be able to 
clear the immutable bit on all the files and make the problem go away or 
you may need a more complex solution.

HTH,
Micah


More information about the freebsd-questions mailing list