Lock It (File Locker/Unlocker)

Dolphin Service Menus

Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

3
Become a Fan
6.4

Description:
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.

Ratings & Comments

13 Comments

xrooters

on kubuntu 12.10 x64

hipersayanx

On Arch Linux it works well, I use it day-by-day. I don't know what do you meant with "errors", I tested the code in Bash before and give no errors. Are you using the last version?

aimeylie

Bonjour, 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

aimeylie

Hello, my machine : debian 6.0.4 kernel 2.6.32.5-686 et KDE 3.5.10. Functions in locked and no in unlocked! Why? Thank you.

hipersayanx

I not tested this service in KDE 3.5, just in KDE 4, I have no idea if this is a problem related to your desktop, sorry. 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.

masterdany88

It dosnt work... :( after I look my katalog in ~ I can normally access it!!!

hipersayanx

What do you mean with "normally"? 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.

gnagnibu

After locking a file or folder with non privileged user, I can delete it. You said the plugin works only with root permissions: I think it will ask me for sudo password, but isn't it.

hipersayanx

What file system are you using? If you run this command: sudo chattr +i -R folderToLock or sudo chattr +i fileToLock What is the error message?

gnagnibu

Problem solved. 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

hipersayanx

Fixed thank you!

kdekda

Add trailing semicolon at the end of Actions array in both files

hipersayanx

Fixed, thank you.

Pling
0 Affiliates
Details
license
version 1.1.0
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 3

Other Dolphin Service Menus:

burnWithGrowisofs
chunkylover
last update date: 20 years ago

Score 5.0

Firefox-bookmarks service menu
storyteller
last update date: 20 years ago

Score 5.0

Text Convert Service Menu
smp-penguin
last update date: 21 years ago

Score 5.0

Pdflatex servicemenu
bobuse
last update date: 20 years ago

Score 5.0

Send through Bluetooth
dmnet
last update date: 21 years ago

Score 5.0

Add to Bloglines
spookster
last update date: 20 years ago

Score 5.0



System Tags