[mythtv-users] Is there a way to make a recording"Read-Only" -- "Protect" it from deletion

Bryan Halter bhalter at armyofpenguins.com
Thu Apr 13 04:34:15 UTC 2006



Marco Nelissen wrote:
>> That won't work. If you have write permissions to the directory, you
>> can remove any file in it regardless of the file permissions.
>>     
>
> That's why you'd set the "sticky" on that directory. That way only the
> owner of a file will be able to delete it.
>
>   
You're only mostly right about the no write privs on the file.  Yes if
you have write privs on the directory you can still unlink the file but
you need to use the -f option.  I don't know how Myth deletes files so
it may do the equivalent of this.  An idea would be to change the
ownership to root:root and mode 644.  See below:

bhalter at excelsior ~ $ ls -l test.mpg
-r--r--r--  1 bhalter root 9076672 Feb 11 12:31 test.mpg
bhalter at excelsior ~ $ rm test.mpg
rm: remove write-protected regular file `test.mpg'? n
bhalter at excelsior ~ $ rm -f test.mpg
bhalter at excelsior ~ $
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20060413/e443a0df/attachment.htm 


More information about the mythtv-users mailing list