/srv/jail duplicates & unknown

Heya all!

A few days ago, I set up a new Hetzner Ubuntu 24.04 VPS with Hestia 1.9.3. Then:

  1. Restored the backup of user ideec of another VPS running Hestia 1.9.3 with the command v-restore-user ideec ideec.2025-03-18_21-47-44.tar
  2. Created new user tosy
  3. Ran the commands v-change-database-owner ideec_wp tosy, v-change-domain-owner [DOMAIN] tosy Both commands completed with no errors
  4. Deleted user ideec via HestiaCP UI

That left me with the following folders inside /srv/jail

  • /tosy
  • /ideec_root
  • /tosy_root

What I was expecting to find, was a single entry /srv/jail/tosy

What steps do I need to take to correct the situation and have ONLY the entry /srv/jail/tosy without the rest?

If someone knows, what did I do wrong and was left with that problem?

I think I am beginning to understand the issue…

I just deleted the FTP Account of the tosy user and than also removed the /srv/jail/tosy_root directory.

So I guess, the user ideec also had an FTP user. But that FTP user was not removed when I run v-change-domain-owner, or when I deleted the user ideec from HestiaCP UI. That would explain the existence of the directory /srv/jail/ideec_root (of the now deleted user ideec) which points to the same directory as /srv/jail/tosy.

I suppose this means that the command v-change-domain-owner needs to be corrected in order to check for FTP user accounts and remove them from /srv/jail.

Now… As far as I remember, the directories in /srv/jail are symlinks (or something) bind mounts (thanks @sahsanu). How do I remove the obsolete ones (without deleting the actual data of course :smile:)?

Hi @Felix

Before trying to remove anything, show the output of this command:

systemctl list-units --type=mount

Here it is…

  UNIT                                          LOAD   ACTIVE SUB     DESCRIPTION
  -.mount                                       loaded active mounted Root Mount
  boot-efi.mount                                loaded active mounted /boot/efi
  dev-hugepages.mount                           loaded active mounted Huge Pages File System
  dev-mqueue.mount                              loaded active mounted POSIX Message Queue File System
  proc-sys-fs-binfmt_misc.mount                 loaded active mounted Arbitrary Executable File Formats File System
  run-user-0.mount                              loaded active mounted /run/user/0
  srv-jail-fumo-home-fumo.mount                 loaded active mounted Mount fumo's home directory to the jail chroot
  srv-jail-[redacted]-home-[redacted].mount loaded active mounted Mount [redacted]'s home directory to the jail chroot
  srv-jail-ideeb_fm-home-ideeb_fm.mount         loaded active mounted Mount ideeb_fm's home directory to the jail chroot
  srv-jail-ideec_root-home-ideec_root.mount     loaded active mounted Mount ideec_root's home directory to the jail chroot
  srv-jail-tosy-home-tosy.mount                 loaded active mounted Mount tosy's home directory to the jail chroot
  sys-fs-fuse-connections.mount                 loaded active mounted FUSE Control File System
  sys-kernel-config.mount                       loaded active mounted Kernel Configuration File System
  sys-kernel-debug-tracing.mount                loaded active mounted /sys/kernel/debug/tracing
  sys-kernel-debug.mount                        loaded active mounted Kernel Debug File System
  sys-kernel-tracing.mount                      loaded active mounted Kernel Trace File System

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

16 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Please note that the users ideec and ideeb do not exist any more.

As an example, to remove ideec_root mount:

systemctl stop srv-jail-ideec_root-home-ideec_root.mount
systemctl disable srv-jail-ideec_root-home-ideec_root.mount
rm /etc/systemd/system/srv-jail-ideec_root-home-ideec_root.mount
systemctl daemon-reload 

And check whether the dir still exists.

2 Likes

Ran the following:

systemctl stop srv-jail-ideec_root-home-ideec_root.mount
systemctl disable srv-jail-ideec_root-home-ideec_root.mount
	Removed "/etc/systemd/system/local-fs.target.requires/srv-jail-ideec_root-home-ideec_root.mount".
rm /etc/systemd/system/srv-jail-ideec_root-home-ideec_root.mount
systemctl daemon-reload

and

systemctl stop srv-jail-ideeb_fm-home-ideeb_fm.mount
systemctl disable srv-jail-ideeb_fm-home-ideeb_fm.mount
	Removed "/etc/systemd/system/local-fs.target.requires/srv-jail-ideeb_fm-home-ideeb_fm.mount".
rm /etc/systemd/system/srv-jail-ideeb_fm-home-ideeb_fm.mount
systemctl daemon-reload

After that I also rebooted the VPS.

Now the command systemctl list-units --type=mount is showing:

  UNIT                                          LOAD   ACTIVE SUB     DESCRIPTION
  -.mount                                       loaded active mounted Root Mount
  boot-efi.mount                                loaded active mounted /boot/efi
  dev-hugepages.mount                           loaded active mounted Huge Pages File System
  dev-mqueue.mount                              loaded active mounted POSIX Message Queue File System
  proc-sys-fs-binfmt_misc.mount                 loaded active mounted Arbitrary Executable File Formats File System
  run-user-0.mount                              loaded active mounted /run/user/0
  srv-jail-fumo-home-fumo.mount                 loaded active mounted Mount fumo's home directory to the jail chroot
  srv-jail-[redacted]-home-[redacted].mount     loaded active mounted Mount hestiamaster's home directory to the jail chroot
  srv-jail-tosy-home-tosy.mount                 loaded active mounted Mount tosy's home directory to the jail chroot
  sys-fs-fuse-connections.mount                 loaded active mounted FUSE Control File System
  sys-kernel-config.mount                       loaded active mounted Kernel Configuration File System
  sys-kernel-debug.mount                        loaded active mounted Kernel Debug File System
  sys-kernel-tracing.mount                      loaded active mounted Kernel Trace File System

Legend: LOAD   → Reflects whether the unit definition was properly loaded.
        ACTIVE → The high-level unit activation state, i.e. generalization of SUB.
        SUB    → The low-level unit activation state, values depend on unit type.

13 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

But the directories /srv/jail/ideec_root/ and /srv/jail/ideeb_fm/ still exist :frowning_face:

Doesn’t matter whether they exist, the important thing is whether they are not showing the real dir/files:

ls -l /srv/jail/ideec_root/
ls -l /srv/jail/ideec_root/home/
ls -l /srv/jail/ideec_root/home/ideec_root/

If you can’t see the contents then you can delete the dir /srv/jail/ideec_root/

1 Like

Oh! You’re right!!

The directories are there, but there are no subdirs after /srv/jail/ideec_root/home/ideec_root and /srv/jail/ideeb_fm/home/ideeb_fm :grinning:

I guess I can delete those now: /srv/jail/ideec_root and /srv/jail/ideeb_fm

Thank you very much! I wouldn’t have managed it myself!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.