• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Forwarded to devs Chrooted shell environments are broken after rebuilding

Hangover2

Regular Pleskian
Username: Hangover2

TITLE

Chrooted shell environments are broken after rebuilding

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian 18.0.31.1 / Debian Buster (amd64)

PROBLEM DESCRIPTION

Since the Plesk Obsidian 18.0.31 update the chrooted shell environment in subscriptions cannot be used anymore after running the update_chroot.sh script explained in How to rebuild chroot template on a server with Plesk?

STEPS TO REPRODUCE

- upgrade to Plesk Obsidian 18.0.31
- create a subscription with a chrooted system user (e.g. system_user)
- rebuild the chrooted environment by using the Plesk script mentioned (update_chroot.sh)
- try to login as the system user of the chrooted subscription, e.g. "su system_user"

ACTUAL RESULT

Login of chrooted system user fails:

user with id=10001 and name=system_user not found in chrooted passwd file
system error: Invalid argument

Reason: after rebuilding the chrooted environments of the subscriptions the "group" and "passwd" files are emptied.

Problem is maybe related to the following resolved issue from the changelog of Plesk Obsidian 18.0.31:
"Disabling chrooted shell for a system user now correctly results in the /etc/passwd and /etc/group files being deleted. (PPPM-10750,PPPM-10149)"

EXPECTED RESULT

successful login

ANY ADDITIONAL INFORMATION



YOUR EXPECTATIONS FROM PLESK SERVICE TEAM


Confirm bug
 
Last edited:
Thank you for the report.
Please use updated script from attachment.
 

Attachments

  • update_chroot.sh.zip
    6.1 KB · Views: 22
Hello,

the new script provided does not work for us.
There are two issues with the new script:

a) an already solved problem with the "filetype application/x-pie-executable; charset=binary" was introduced again (fixed in the past):

./update_chroot.sh --add /opt/plesk/php/7.4/bin/php
WARNING: /opt/plesk/php/7.4/bin/php is not a program (filetype application/x-pie-executable; charset=binary), skipping.
ERROR: /opt/plesk/php/7.4/bin/php was not installed due to the previous errors.

Reason: at the moment there are two Plesk articles with links to two different versions of that script - one including support for "filetype application/x-pie-executable". Please include again.

b) "./update_chroot.sh --apply all" still leads to errors:

Applying chrooted environment on my.server.com: setup_chroot(): No chrooted shell for system_user found
setup_chroot(): No chrooted shell for system_user found
Done! Action have been completed.

After this login is broken again:

su system_user
user with id=10001 and name=system_user not found in chrooted passwd file
system error: Invalid argument
 
Last edited:
FYI: Just tested the new script on an old Debian Stretch system with "Plesk Version 18.0.31 Update #2".

Here it works like a charm again.
 
Back
Top