Secure File from Delete & Edit in ubuntu: ----------------------------------------- Lock a folder from delete and edits: sudo chattr +i -R /path/to/folder Remove lock so I can re-edit or delete a folder: sudo chattr -i -R /path/to/folder ------------------------------------------ Lock a file from delete and edits: sudo chattr +i /path/to/file Remove lock so I can re-edit or delete a file: sudo chattr -i /path/to/file ------------------------------------------- Source: https://www.unixmen.com/secure-file-from-removal-in-linux-and-unix/ Date: February 20th, 2021