• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Domain (SSH) user can see other directories

JogoVogo

Basic Pleskian
Server operating system version
Debian 12.8
Plesk version and microupdate number
Plesk Obsidian v18.0.65_build1800241106.13
Hello everyone,

a customer has just pointed out to us that if he contacts Filezilla or SSH logs into his domain, goes up some directories and sees all vhosts (customers) there. A separate subscription is available.

SSH access is (/bin/bash (chrooted)

Write permission does not exist but it should not be able to read it either... Can this be changed!?

Cheers
Ron
 
The nature of a chrooted environment is that it must not be possible to breakout of the chrooted jail. Especially not via FTP or SFTP. I suggest disabling SSH access and in a second step re-enabling it with the chrooted option. If you are still able to breakout afterwards, please contact Plesk support on this.
 
We've seen this behavior in the past, and will try your suggestion as well. I personally like having the ability to SSH to a client site, but we turn it off for just this reason, there is to much uncertainty and confusion when enabling this option. I'd be curious to hear others opinion and experience with this, and also their take on even enabling client ssh from the outside to a plesk server....we specifically block port 22 to all plesk servers.
 
Other shells thank ``forbidden (/bin/false)`` and ``/bin/bash (chrooted)`` will give access to the entire file system. This means the system user can read all files that have read permissions for other users and access folders that have execute permissions for other users.
However, the actual webspaces/subscription folders can't be accessed by other users since they have 710 permissions. They can be accessed only by the system user associated with the webspace/subscription and the webservers group (psaserv)

If you wish to hide the webspace/subscription folders, run:
Code:
chmod 710 /var/www/vhosts
This change will be reverted by plesk repair!

/bin/bash (chrooted) is the simplest way, but it gets more complicated when php access is required. The chrooted environment doesn't have any php.
 
Good day!

This is a serious problem because we have now switched to “/bin/bash (chrooted)”. Nevertheless, it is possible to wander in the directories. We absolutely need a solution for this!

Cheers
Ron
 
Good day!

This is a serious problem because we have now switched to “/bin/bash (chrooted)”. Nevertheless, it is possible to wander in the directories. We absolutely need a solution for this!

Cheers
Ron
That is how SSH is designed to work. You connect to the system and have access to your own files and other locations that have the permissions for other users to access.

The “/bin/bash (chrooted)” shell creates a Linux file system in the webspace/subscription (/var/www/vhosts/domain.tld). You ssh directly there and can't access anything above /var/www/vhosts/domain.tld or anywhere else in the file system. However, this creates the problem with special applications like PHP which need to be copied to the webspace in order to be able to use them.

> Nevertheless, it is possible to wander in the directories

In which directories when you have the /bin/bash (chrooted) shell?

/bin/bash (chrooted) or don't provide ssh access at all. You can also change the permissions on /var/www/vhosts but it can be reverted after a "plesk repair"!

> What should I do here, only Plesk himself can help...

Reach out to your hoster with this problem and your hoster can open a Plesk ticket with your problem.

P.S. system users can't see each other's files. Even though you can see what other websites are hosted by listing /var/www/vhosts or by checking /etc/passwd, you can't actually access /var/www/vhosts/otherDomain.tld.

P.P.S. I highly recommend enabling "Restrict the ability to follow symbolic links" in Apache & Nginx. It will prevent the webserver from accessing symbolic links to other webspaces/subscriptions if the source and destination owners don't match. This feature blocks the lateral movement of an attacker in case one of your websites gets compromised.
 
Back
Top