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

مشاهدة النسخة كاملة : السي بانيل Cpanel | حل مشكلة Error: Failed to lock and read from file /passwd”



Rise Company
15-03-2022, 21:20
حل مشكلة لا يمكن انشاء ايميل Error: Failed to lock and read from file /passwd”
Failed to chown “/home/****/etc/****/passwd” to group “mail”:
Error: Failed to lock and read from file “/passwd”: “Permission denied”
Operation not permitted at /usr/local/cpanel/Cpanel/Email/Perms/User.pm
Could not open “/home/yoursite/etc/yoursite.com/passwd” as “yoursite”: Permission denied
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 “passwd” to group “mail
/etc/passwd file corrupted

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

-----------------------------------------------------
[U]المشكلة :
-----------------------------------------------------

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/16473676488462.png

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

-----------------------------------------------------
حل المشكلة :
-----------------------------------------------------

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



عند عمل repair للايميلات Repair Mailbox Permissions Rebuild Mail Databases and Fix Permissions
هيظهر لك خطا Failed to chown ومكتوب بجانبه مسار الملف الى به الخطا لليوزر المحدد





Failed to chown “/home/clientsite/etc/clientsite.com/passwd” to group “mail”: Operation not permitted at /usr/local/cpanel/Cpanel/Email/Perms/User.pm line 308



عند الذهاب الى هذا الملف ومحاوله فتحه هيظهر لك خطا فى الصلاحية

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



Could not open “/home/yoursite/etc/yoursite.com/passwd” as “yoursite”: Permission denied


كل ما عليك فعله هو حذف هذا الملف وهيتولد واحد جديد تلقائيا ولكن ملف سليم بدون مشكلة فى الصلاحيات
والافضل عمل rename له بوضع .bk فى نهايته كما فى الصورة

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

ثم اذهب وعمل ايميل جديد وهتجد ان المشكلة تم حلها 100 %

ارجع لنفس المسار وهتجد ان ملف جديد تم انشاءه تلقائيا بعد انشاء الايميل الجديد

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



للمزيد من التفاصيل عن الملف من هنا
https://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/

/etc/passwd file no need to worries as its not having password, the /etc/passwd file
having user name uid,gid and home dir information, the password is stored in the /etc/shadow and its in encrypted format

ملف passwd file لا يحتوى على باسورد ولكن information فقط
لن يحدث شىء للايميلات و لا الباسورد لن يحدث لها شىء ايضا
والباسوردات موجودة فى ملف shadow مشفرة .

الخلاصة :
حذف ملف passwd file امن تماما ولن تواجهك اى مشكلة اطلاقا


ملحوظة :
تم تجربة هذه الطريقة وهى تعمل 100 %
تم تجربة العشرات من الحلول جميعها فشل !!!
فلا تحاول وتضيع وقتك بدون فائدة .

شاهد من هنا

السي بانيل Cpanel | حل مشاكل تغيير اسم Domain و USER و Home Directory (https://www.rise.company/forum/threads/83099-%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%D8%A7%D9%83%D9%84-%D8%AA%D8%BA%D9%8A%D9%8A%D8%B1-%D8%A7%D8%B3%D9%85-Domain-%D9%88-USER-%D9%88-Home-Directory)

مرجع:
https://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/
https://security.stackexchange.com/questions/18057/can-etc-passwd-file-be-accessed-on-a-cpanel-shared-hosting-account
https://docs.cpanel.net/knowledge-base/accounts/account-creation-errors/
https://docs.cpanel.net/knowledge-base/security/security-best-practices/
https://www.quora.com/Can-my-hosting-provider-company-see-my-cPanel-password
https://linuxize.com/post/etc-passwd-file/

Rise Company
15-03-2022, 22:25
Understanding /etc/passwd File Format (https://www.cyberciti.biz/faq/understanding-etcpasswd-file-format/)

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

Can you explain /etc/passwd file format for Linux and Unix-like operating systems?

The /etc/passwd file stores essential information required during login. In other words, it stores user account information. The /etc/passwd is a plain text file. It contains a list of the system’s accounts, giving for each account some useful information like user ID, group ID, home directory, shell, and more. The /etc/passwd file should have general read permission as many command utilities use it to map user IDs to user names. However, write access to the /etc/passwd must only limit for the superuser/root account.




Tutorial details


Difficulty level
Easy (http://www.cyberciti.biz/faq/tag/easy/)


Root privileges
No


Requirements
Linux terminal


OS compatibility
*BSD • Linux (https://www.cyberciti.biz/faq/category/linux/) • Unix (https://www.cyberciti.biz/faq/category/unix/) • WSL


Est. reading time
4 minutes







Understanding /etc/passwd file fields

The /etc/passwd contains one entry per line for each user (user account) of the system. All fields are separated by a colon (:) symbol. Total of seven fields as follows. Generally, /etc/passwd file entry looks as follows:

https://www.rise.company/forum/image/svg xml;base64,PHN2ZyBoZWlnaHQ9IjEyOSIgd2lkdGg9Ijc0NiI geG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2Z XJzaW9uPSIxLjEiLz4=https://www.rise.company/forum/images/imported/2022/03/3.png (https://www.cyberciti.biz/media/ssb.images/uploaded_images/passwd-file-791527.png)
(Fig.01: /etc/passwd file format – click to enlarge) /etc/passwd file format

From the above image:



[*=center]Username: It is used when user logs in. It should be between 1 and 32 characters in length.
[*=center]Password: An x character indicates that encrypted password is stored in /etc/shadow file (https://www.cyberciti.biz/faq/understanding-etcshadow-file/). Please note that you need to use the passwd command to computes the hash of a password typed at the CLI or to store/update the hash of the password in /etc/shadow file.
[*=center]User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.
[*=center]Group ID (GID): The primary group ID (stored in /etc/group file)
[*=center]User ID Info (GECOS): The comment field. It allow you to add extra information about the users such as user’s full name, phone number etc. This field use by finger command.
[*=center]Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes /
[*=center]Command/shell: The absolute path of a command or shell (/bin/bash). Typically, this is a shell. Please note that it does not have to be a shell. For example, sysadmin can use the nologin shell, which acts as a replacement shell for the user accounts. If shell set to /sbin/nologin and the user tries to log in to the Linux system directly, the /sbin/nologin shell closes the connection.


I hope you understood /etc/passwd file format to keep track of every registered user that has access to a system. Therefore, knowing the structure is essential for security reasons.