mhogomchungu / sirikali

A Qt/C++ GUI front end to sshfs, ecryptfs-simple, cryfs, gocryptfs, securefs, fscrypt and encfs
http://mhogomchungu.github.io/sirikali
GNU General Public License v3.0
752 stars 58 forks source link

QUESTION - unmount and cleaning up directory #263

Closed AtomicRobotMan0101 closed 2 months ago

AtomicRobotMan0101 commented 2 months ago

Love sirikali.

Question basic

Sirikali creates a mount point if it is absent. How do I set it so the mountpoint is removed upon unmounting?

Question background

The problem

What I'd like

I see there are a few fields in the Favourites area, in the form of a PostUnMount Command.... but I cannot find anything about this in the man, info or on the Git. Its sort of obvious what it should do.... but I have no idea of what it expects me to fill in (shell commands? a scriptlet?)

mhogomchungu commented 2 months ago

The mount point should be removed when unmounting.

Create a gocryptfs test volume that mounts to your home directory and check if the mount point gets removed or not when unmounting.

When SiriKali window has focus, press CTRL+D to bring up debug window and then unmount a gocryptfs volume and post the contents of the debug window.

AtomicRobotMan0101 commented 2 months ago

Attached is the complete log --> fire up SK, mount a volume, dismount.

Can confirm that with the basic "mount this" and then "dismount this" process that it doesn't delete the directory created as /home/nas/router-encrypted

(The user is "nas" on this machine. It has admin rights)

The directory that is gocryptfs encrypted is on a SMB1.0 mounted FAT32 HDD, connected to an ancient routers USB2. As decrepit as that is, I don't feel this is the problem and the issue is more local.

As a curiosity

The user directory itself is encrypted with ecryptfs.

It is the plain-vanilla install of this tool. Rather than using LUKS, which needs a password on boot and limits the usefulness of a server should it bounce, I chose ecryptfs so the users /home directory is encrypted and a regular password is needed at session login. It has not affected any other program/process. I can't find anything in the machines logs which indicates a conflict... bbuttttt.....

ALSO, it would be noted that the SK initialisation says "Showing an unlocked volume because we could not figure out who unlocked it" and this would be due to the above.

sirikali-notunmounting.txt

mhogomchungu commented 2 months ago

Is Below Option checked? If yes, uncheck it and try again.

Screenshot_20240712_082712

AtomicRobotMan0101 commented 2 months ago

Thanks for your help so far.

This is getting weird. I ran this up on a fresh VM (virt-manager Mint 21.3) and it worked perfectly, exactly as you said it should.

However, on the two existing machines (the server and my main box) the damned thing wont delete the obsolete directory on the FAT32 remotely mounted disk.

I copy/pasted the fstab off the server (so they are identical) and even blew away the entire SK install on those two boxes - then reinstalled fresh AND checked the configs.... same result as before. Gah!

I'll keep digging. I cant seem to:

I find it quite perplexing.

mhogomchungu commented 2 months ago

Did you make sure the option I said above should be unchecked in unchecked.

AtomicRobotMan0101 commented 2 months ago

I did that tick, untick thing and it seems to have worked.

Now, I can't be 100% sure that's because I purged it clean with apt, cleaned the wallet, deleted the various configs, etc with a fresh deb blob installed.... or something else.

It was a vexxing problem.

I must admit, my initial premise was entirely stupid and shouldn't be supported! I was reusing some ancient hardware (an old Archer 1200 modem), using old protocols (SMB1.0) that have been long abandoned, with a rickety rusty HDD attached to a USB2 !!! .... Its the stuff of nightmares.

Thank you for tolerating me in this query. You have been most kind.