المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : السي بانيل Cpanel | حل مشاكل تغيير اسم Domain و USER و Home Directory



Rise Company
15-03-2022, 20:06
السي بانيل Cpanel | حل مشاكل تغيير اسم USER و الصلاحيات فى Home Directory
The directory public_html does not exist. at /usr/local/cpanel/Cpanel/EventHandler.pm
cpanel This directory is empty. - This server has an XFS® filesystem
How to fix Error You do not have permission to access - quota does not exist; skipping
Error: Failed to lock and read from file - following error: Permission denied
Quota file does not exist; skipping - The system failed to lock the file
Script to Fix Account Permissions - can't create any emails of any of my clients
Failed to chown “/home/****/etc/****/passwd” to group “mail”:
Operation not permitted at /usr/local/cpanel/Cpanel/Email/Perms/User.pm
Failed to chown “passwd” to group “mail

https://www.rise.company/upload/uploads/164736764892913.png

[U]المشكلة :
عند تغيير الدومين الى اخري لنفس حساب cpanel تحدث مشكلة احيانا
ان عند فتح filemanager يفتح على مسار user الدومين القديم وليس الجديد كوضع افتراضى


قد تحدث ايضا عند النقل

عند نقل موقع من كلاود لينكس cloud Linux الى لينكس Linux
ولا يحدث مع العكس ! من لينكس الى كلاود !

تظهر هذه المشكلة بسبب اختلاف نظام العمل فى الكلاود الصارمة cage
وبالتالى تجد هذه المواقع لا تفتح او تفتح على مواقع اخري
بسبب انها تاخذ username موقع اخر عند نقلها الى اللينكس.

حل المشكلة :
حل مشكلة cpanel This directory is empty فى الصورة فى الاعلى
كل ما عليك فعله هو الضغط على settings ثم اختر Home Directory واعمل save
ثم ادخل مرة اخري واختر web root واعمل save
وهتجد ان المشكلة اتحلت عند فتح file manager هيفتح على public الصحيح.

-----------------------------------------------------------
مبروك حل المشكلة :)
-----------------------------------------------------------

################################

----------------------------------------------------------------
مشكلة Quote و الصلاحية Permissions
----------------------------------------------------------------

كيفية معرفة وجود خطا ام لا فى cpanel

* حل مشكلة الايميل فى اخر صورة فى منتهى السهولة !!!

https://www.rise.company/upload/uploads/16473676488462.png

https://www.rise.company/upload/uploads/164736871774821.png

المشكلة :

Error: Failed to lock and read from file “****/passwd”: “Permission denied”. (XID 6tr2bu) The system failed to lock the file “******/passwd” (as EUID: 1112, EGID: 1114 1114) because of the following error: Permission denied


حل المشكلة :

https://www.rise.company/upload/uploads/162300031819661.png

ملحوظة :
يجب عمل ريستارت للسيرفر

https://www.rise.company/upload/uploads/164736764877861.png

https://www.rise.company/upload/uploads/164737073070911.png

https://www.rise.company/upload/uploads/164737331317391.png


شاهد ايضا
السي بانيل Cpanel | حل مشكلة Error: Failed to lock and read from file /passwd (https://www.rise.company/forum/threads/83101-%D8%A7%D9%84%D8%B3%D9%8A-%D8%A8%D8%A7%D9%86%D9%8A%D9%84-Cpanel-%D8%AD%D9%84-%D9%85%D8%B4%D9%83%D9%84%D8%A9-Error-Failed-to-lock-and-read-from-file-passwd%E2%80%9D)

السي بانال WHM/CPanel حل مشكلة Warning: quota file /path/to/quota does not exist (https://www.rise.company/forum/threads/73332-%D8%A7%D9%84%D8%B3%D9%8A-%D8%A8%D8%A7%D9%86%D8%A7%D9%84-WHM-CPanel-%D8%AD%D9%84-%D9%85%D8%B4%D9%83%D9%84%D8%A9-Warning-quota-file-path-to-quota-does-not-exist)

السي بانال WHM/cPanel حل مشكلة Filemanager يظهر فارغ او يوزر خطا Wrong Username (https://www.rise.company/forum/showthread.php/86989-%D8%A7%D9%84%D8%B3%D9%8A-%D8%A8%D8%A7%D9%86%D8%A7%D9%84-WHM-cPanel-%D8%AD%D9%84-%D9%85%D8%B4%D9%83%D9%84%D8%A9-Filemanager-%D9%8A%D8%B8%D9%87%D8%B1-%D9%81%D8%A7%D8%B1%D8%BA-%D8%A7%D9%88-%D9%8A%D9%88%D8%B2%D8%B1-%D8%AE%D8%B7%D8%A7-Wrong-Username)


المرجع:
https://www.namecheap.com/support/knowledgebase/article.aspx/1034/29/how-to-fix-error-you-do-not-have-permission-to-access/
https://forums.cpanel.net/threads/problem-with-viewing-email-accounts.525311/
https://forums.cpanel.net/threads/cant-create-an-email-account.655947/
https://www.thecpaneladmin.com/fix-account-permissions/

Rise Company
15-03-2022, 20:59
This is a simple bash script I wrote to fix the permissions and ownership of files within a cpanel account. To use, simply copy the script your server, chmod 755, and pass the usernames as arguments:

./fixperms user1 user2 user3
You can also run a server-wide loop like this:

for i in `ls -A /var/cpanel/users` ; do ./fixperms $i ; done
Below is the script, but I recommend downloading it from here (http://thecpaneladmin.com/files/fixperms.sh.txt) to ensure that the formatting is correct.



#!/bin/bash
# Script to fix permissions of accounts
# Written by: Vanessa Vasile 5/13/10
# http://thecpaneladmin.com

if [ "$#" -lt "1" ];then
echo "Must specify user"
exit;
fi

USER=$@

for user in $USER
do

HOMEDIR=$(egrep "^${user}:" /etc/passwd | cut -d: -f6)

if [ ! -f /var/cpanel/users/$user ]; then
echo "$user user file missing, likely an invalid user"

elif [ "$HOMEDIR" == "" ];then
echo "Couldn't determine home directory for $user"


else

echo "Setting ownership for user $user"

chown -R $user:$user $HOMEDIR
chmod 711 $HOMEDIR
chown $user:nobody $HOMEDIR/public_html $HOMEDIR/.htpasswds
chown $user:mail $HOMEDIR/etc $HOMEDIR/etc/*/shadow $HOMEDIR/etc/*/passwd

echo "Setting permissions for user $USER"

find $HOMEDIR -type f -exec chmod 644 {} \; -print
find $HOMEDIR -type d -exec chmod 755 {} \; -print
find $HOMEDIR -type d -name cgi-bin -exec chmod 755 {} \; -print
find $HOMEDIR -type f \( -name "*.pl" -o -name "*.perl" \) -exec chmod 755 {} \; -print

chmod 750 $HOMEDIR/public_html

if [ -d "$HOMEDIR/.cagefs" ]; then
chmod 775 $HOMEDIR/.cagefs
chmod 700 $HOMEDIR/.cagefs/tmp
chmod 700 $HOMEDIR/.cagefs/var
chmod 777 $HOMEDIR/.cagefs/cache
chmod 777 $HOMEDIR/.cagefs/run
fi
fi
done