Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Results 1 to 14 of 14

Thread: Changing recorded file to read only

  1. #1

    Title
    Senior Member
    Join Date
    Nov 2017
    Posts
    201
    Thanks
    35
    Thanked 25 Times in 23 Posts

    Changing recorded file to read only

    I want to set some recordings as read only, to avoid inadvertently deleting them. I have looked in help for a button or menu setting, but haven't found anything. Is it a matter of using 'chmod 0444' on the .ts file, or will this break things if someone presses the delete button? Are there any other files I should also change?
    Kind regards,

    Mick

  2. #2
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,360
    Thanks
    6,442
    Thanked 9,160 Times in 6,235 Posts
    I don't know what the answer is, but try it. You can also use the chattr command.
    Code:
    https://www.geeksforgeeks.org/chattr-command-in-linux-with-examples/

  3. #3
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,790
    Thanks
    237
    Thanked 1,658 Times in 1,306 Posts
    Quote Originally Posted by Mickkie View Post
    I want to set some recordings as read only, to avoid inadvertently deleting them.
    You could create a "Keep" folder and move such things into there.
    Won't stop you deleting them, but might provide a reminder that you don't wish to.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  4. #4

    Title
    Senior Member
    Join Date
    Nov 2017
    Posts
    201
    Thanks
    35
    Thanked 25 Times in 23 Posts
    Thanks guys,

    A "Keep" folder will need subdirectories, to match the categories of recordings (Films, News, Documentaries, etc.) mirroring the current storage folders. This can lead to an error by absent minded users, when they won't realise they're in the depths of the "Keep" filesystem.

    I tried chmod on a .ts file, it didn't work. The recording was moved to .Trash without any warnings. I suppose the delete/move command runs as root.

    Then I tried 'chattr +i' on the .ts file. This succeeded in keeping the .ts file into its original folder, along with a newly generated .ts.meta file. All other than the .ts files, including .eit were moved to .Trash. I could set the .eit file as immutable too, but all cut marks on the recording will be lost.

    I think this requires a programmatic function, so that marked recordings generate a warning and ask for interactive input from the user before they can be deleted.
    Kind regards,

    Mick

  5. #5
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    You can disable the automatic deletion of items in the trash can after n days.

    Or copy the recordings you want to keep somewhere else.

  6. #6

    Title
    Senior Member
    Join Date
    Nov 2017
    Posts
    201
    Thanks
    35
    Thanked 25 Times in 23 Posts
    Yes, a back up off the main directory will protect from erroneous deletions, but eat up storage for duplicated files. Disabling automatic deletion would work, as long as no one empties the .Trash manually, which tends to happen frequently before even the automatic deletion kicks in.
    Kind regards,

    Mick

  7. #7
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    Sounds like they're intent on deleting your recordings whatever you try.

  8. #8
    Willo3092's Avatar
    Title
    ViX Beta Tester
    Join Date
    Oct 2016
    Location
    East Midlands
    Posts
    1,067
    Thanks
    752
    Thanked 403 Times in 303 Posts
    Just create a new folder on /media/hdd/ and bookmark it.
    Willo
    #######################
    AX HD61 4K UHD Twin (test box)
    Vu+ Uno 4K SE
    Edision OS Mio 4K
    Zgemma H9 Twin
    Vu+ Zero 4K
    Vu+ Uno 4K
    GT-Sat GT-S3DCSS24 Unicable II LNB
    GT-Sat GT-dLNB1-DY Unicable II LNB
    #######################

  9. #9
    BrokenUnusableAccount
    I've never seen an OS where setting a file to read only has any effect on whether you can delete it.
    It's certainly not that way in Linux.

    Now if OpenViX didn't run everything as root you could probably do it by changing the owner of the files.
    However OpenViX does run everything as root.
    Last edited by BrokenUnusableAccount; 15-02-22 at 02:18.

  10. #10
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,790
    Thanks
    237
    Thanked 1,658 Times in 1,306 Posts
    Preventing deletion at the OS level is probably not useful here anyway. All that would do is either:
    • produce an error message when you do try to delete it, or
    • produce no error message, but leave the file in place - leading to some confusion.

    What would be better is for the file browser to have a (toggling) mechanism to mark the recording as non-removable, indicate it as such in the listing and behave accordingly.
    If it's worth doing at all.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  11. #11
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    Quote Originally Posted by birdman View Post
    If it's worth doing at all.
    Precisely.

    Maybe remap the red delete key to something else, that would slow them down, and there would still less obvious ways to delete recordings.

  12. #12

    Title
    Senior Member
    Join Date
    Nov 2017
    Posts
    201
    Thanks
    35
    Thanked 25 Times in 23 Posts
    Quote Originally Posted by ccs View Post
    Precisely.

    Maybe remap the red delete key to something else, that would slow them down, and there would still less obvious ways to delete recordings.
    Heh! The red button and increasingly the green and blue buttons too has become less receptive to input, hence all users are now trained to delete recordings via Menu > '3'.

    I recall the old Topfield STB had a setting to mark recordings as "Protected", which stopped users from deleting them. I suppose this is not a general requirement for e2, or someone would have coded it by now.
    Kind regards,

    Mick

  13. #13
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    ....deleted.
    Last edited by ccs; 15-02-22 at 12:42.

  14. #14
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,360
    Thanks
    6,442
    Thanked 9,160 Times in 6,235 Posts
    Quote Originally Posted by ccs View Post
    ....deleted.
    The whole point is to prevent this.

  15. The Following User Says Thank You to abu baniaz For This Useful Post:

    ccs (15-02-22)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.