• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Forwarded to devs chrooted system users out of sync on migration

Webstract

New Pleskian
TITLE:
chrooted FTP users out of sync on migration
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
Plesk Onyx Version 17.5
CentOS Linux 7.3.1611
PROBLEM DESCRIPTION:
Migrating from Server A to Server B breaks the access to the server over SSH. All our users were set to `bin/bash (chrooted)` prior to migration. After migration, users were still set to this but could not log in via SSH or SFTP.​
STEPS TO REPRODUCE:
To Reproduce
  1. Set up user with `bin/bash (chrooted)` access
  2. Migrate server
  3. Log into user on new server via SSH
  4. Cannot login
To Fix (manually)
  1. Change user to `bin/bash` and Apply or OK
  2. Change user back to `bin/bash (chrooted)` and Apply or OK
  3. Now use can log in
To Fix (script used to fix on 150+ users)
  1. See code below
  2. Note: this code was a temporary workaround for us. I am just sharing as an example.
Code:
#!/bin/bash
#pull chrooted users to scratch file
cat /etc/passwd|grep chroot > /tmp/chrootedusers.txt

#iterate, look for mismatches
while read line; do
 THISUID=`echo ${line} | cut -d: -f3`
 THISVHOSTDIR=`echo ${line} | cut -d: -f6`
 THISLOCALPWFILE="$THISVHOSTDIR/etc/passwd"
 OLDUID=`cat $THISLOCALPWFILE|grep -v "0:Root"|cut -d: -f3`
 echo "----------------------------------------"
if [ "$THISUID" != "$OLDUID" ]; then
 echo "MISMATCH:  $THISUID does not equal $OLDUID"
 echo $line
 echo "VHOST DIR: $THISVHOSTDIR"
 echo "PW FILE TO EDIT: $THISLOCALPWFILE"
 echo "Changing..."
 cat $THISLOCALPWFILE
 sed -i.lwbak "s/$OLDUID/$THISUID/" $THISLOCALPWFILE
 echo "Changed, original saved as .lwbak"
 cat $THISLOCALPWFILE
else
 echo "MATCH:  $THISUID equals $OLDUID"
 echo "No changes."
fi
done < /tmp/chrootedusers.txt

#remove scratch file
rm -fv /tmp/chrootedusers.txt
ACTUAL RESULT:
Error logging in.​
EXPECTED RESULT:
Successful login.​
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 
Hello!
Could you please provide the following information:
1. Source panel and panel version
2. Command output:
grep exclude /usr/local/psa/var/modules/panel-migrator/sessions/<session_number>/debug.log
 
  1. Currently I am on Plesk Onyx Version 17.5.3 Update #7 (but this migration was a few versions earlier)
  2. I don't have that module installed anymore
 
Back
Top