
Lock It (File Locker/Unlocker)
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
This service menu uses the file system attributes to prevent user for delete very important files and folders, such as music, video, school works, company databases, etc..
It depends on the "chattr" command provided by the "e2fsprogs", and works only with ext2, ext3 and ext4 file system.
Only the root user can lock or unlock the files, and when a file is locked, not even root can delete it.
The use is pretty simple. Lock the files that you want to protect, when you need to modify a protected file or add a new file to a protected folder, just unlock it, when you finish working with it, lock it again.
- Installation
Just uncompress the file to:
~/.kde4/share/kde4/services/ServiceMenus/
And restart Dolphin and Konqueror.
xrooters
8 years ago
Report
hipersayanx
8 years ago
Are you using the last version?
Report
aimeylie
8 years ago
Cela ne fonctionne pas en "unlocked" sur une Debian, Madriva et Ubuntu avec KDE 4 !? En regardant votre code, je me suis apperçu de beaucoup d'erreurs ! Cela ne peut fonctionner chez vous. NULL --> 0/10
Hello ,
This does not work in "unlocked" on Debian , and Ubuntu with KDE Madriva 4 ! ? Looking at your code , I preview a lot of mistakes ! This can work for you . NULL - > 0/10
Report
aimeylie
8 years ago
Functions in locked and no in unlocked! Why?
Thank you.
Report
hipersayanx
8 years ago
If you have a folder that is still locked, you can unlock it with:
su -c 'chattr -i -R /path/to/folder'
For files, just remove the -R parameter.
Report
masterdany88
9 years ago
after I look my katalog in ~
I can normally access it!!!
Report
hipersayanx
9 years ago
Once a file is locked you can access it for view and read, but you can't access it for edit, write or delete, not even root can do it, not even from a LiveCD.
But this work only on files and folders located in ext2, ext3 and ext4 partitions.
Report
gnagnibu
9 years ago
You said the plugin works only with root permissions: I think it will ask me for sudo password, but isn't it.
Report
hipersayanx
9 years ago
If you run this command:
sudo chattr +i -R folderToLock
or
sudo chattr +i fileToLock
What is the error message?
Report
gnagnibu
9 years ago
The problem is exec option into file .desktop; the solution is:
...
Exec=kdesudo "chattr +i -R %U" && notify-send 'Folders Locked'
...
Exec=kdesudo "chattr -i -R %U" && notify-send 'Folders Unlocked'
and
...
Exec=kdesudo "chattr +i %U" && notify-send 'Files Locked'
...
Exec=kdesudo "chattr -i %U" && notify-send 'Files Unlocked'
I'm running Kubuntu 11.10
Report
hipersayanx
9 years ago
Report
kdekda
9 years ago
Report
hipersayanx
9 years ago
Report