December 17, 2025Dec 17 Author In case anybody is running Windows and would like a neat script to integrate the locking and unlocking of selected folders then let me know and i will share the code, i use this ALL the time now and it does reduce the pain of having your media immutable but wanting to change the odd file/folder, it's super quick as it only runs chattr for the selected folder, a quick demo: https://drive.google.com/file/d/1s4IJL4ofD58njFVre--vD8ZJzBYHAX1H/view?usp=sharing
February 6Feb 6 Author Hi all, new version just released, nothing mind blowingly cool, just some tweaks, the main breaking change is the change of separator from a comma to the pipe symbol for parameter values, changelog:We now do not un-obfuscate the name of chattr during the run this is left in a obfuscated state, the obfuscated name can either be not defined, in which case it's set to 'rttahc' (chattr in reverse) or the user can define their own obfuscated name via the parameter:-sc|--secure-chattr <name>The script now uses the pipe symbol for separators when definine values for the parameters, this allows the script to operate for folder names that container comma's, so for example:--exclude-extensions '*.jpg|*.png' 3. Removed option to lock chattr (obfuscate and change permissions), this is now enforced to ensure we minimise the risk of ransomware running the utility to unlock.To update simply pull down the script, new version is 'v3.0.0':curl -o <location you want the script to go to> -L https://raw.githubusercontent.com/binhex/scripts/refs/heads/master/scripts/unraid/system/no_ransom/no_ransom.sh
March 14Mar 14 Think you might have a minor bugdebug="{defaultDebug}"should bedebug="${defaultDebug}" Edited March 14Mar 14 by xokia
March 14Mar 14 Author 7 hours ago, xokia said:Think you might have a minor bugdebug="{defaultDebug}"Indeed!, not sure how i missed that!, fixed in 3.0.1 (just pushed).
March 16Mar 16 A quick tip that tripped me up that might help someone else:I run this script on my media share that goes cache->array. Well while I was moving all my files off my cache drive to reformat it, I forgot to disable the script cronjob or unlock everything first, and somehow ended up with some immutable folders/files for my 'media' share on my cache drive(after I was putting everything back to normal after formatting). It was alarming at first because running the unlocking version of the script wasn't reaching the cache drive, and it seemed like I was totally locked out of making any changes. I mistakingly tried to perform a reboot, and ended up with a unclean shutdown(unmounting was failing during shutdown). The server booted up fine but I have to run a new parity check now.I'm still not exactly sure how I managed to get immutable folders/files onto my cache drive, as I thought they couldn't be moved? I did so many things for the first time today(added second drive, used unbalancing tool to move files off array drives to switch to encrypted, reformatted my single cache drive from xfs to zfs.)I finally was able to correct it by running the chattr -i command(obfuscated name version) by itself specifically on the share in the cache drive. I'm not very proficient with linux commands yet so this is all probably very obvious to a more seasoned linux user, and is also obviously not in any way a problem with the script. I actually love the script and the peace of mind it gives me.
March 28Mar 28 If you select to only lock 'files', can you still specify to '--include-folders'? Generally I am only trying to affect files but I would also like to include some folders with a specific keyword in the name. This isn't working as intended though, the folders containing the keyword never get made immutable. I even tried with wildcards like '*keyword*'. The examples in the script show you being able to include folders while only selecting to lock 'files'. Is that incorrect and you have to select for 'both'? And if so, will it only include the ones that match the '--include-folders'? Thanks
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.