SOLVED Changed Owner of Files Incorrectly

Mehrdad Tari

Member
Nov 11, 2015
12
2
53
ایران
cPanel Access Level
Root Administrator
hello

Unfortunately I made a mistake
I wanted to change the ownership of a file
Instead of the file
My senses were thrown
I hit the whole path of root (/)
And all files were corrupted
I fixed the access problem
The e-mail has a problem
Will not be delivered
And the WordPress connection to smtp does not work.

How can I Rebuild mail server?
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

You need to give the mail user permission to the mail folder. I think you should ask your system administrator or if you do not have any, you should hire someone to fix this because this is far from explaining things. You can raise a ticket to the cPanel support if you want..

You can also give it a try by executing upcp
 
  • Like
Reactions: Mehrdad Tari

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello,

Did you modify the ownership value of all files under the server's (/) root directory, or under the account's home directory (e.g. /home/$username)?

If you modified the ownership values for all files on the system, then you may want to review the following thread to see the recommended approach to address this issue:

Permissions incorrect serverwide

Thank you.
 
  • Like
Reactions: Mehrdad Tari

Mehrdad Tari

Member
Nov 11, 2015
12
2
53
ایران
cPanel Access Level
Root Administrator
Hi,

You need to give the mail user permission to the mail folder. I think you should ask your system administrator or if you do not have any, you should hire someone to fix this because this is far from explaining things. You can raise a ticket to the cPanel support if you want..

You can also give it a try by executing upcp
Hi,
You must set the home and mail folder owner and permission of each account
it's true?
If you want to Bypassing the problem
By building new hosts, accesses must be self-regulated
With the new host, emails from them will not be sent as phpmail
Because the connection to smtp is not possible

The execution of (upcp and upcp --force) did not help
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello @Mehrdad Tari,

Could you review my last response and let us know the exact command you ran and from which directory you ran it?

Thank you.
 
  • Like
Reactions: Mehrdad Tari

Mehrdad Tari

Member
Nov 11, 2015
12
2
53
ایران
cPanel Access Level
Root Administrator
Hello @Mehrdad Tari,

Could you review my last response and let us know the exact command you ran and from which directory you ran it?

Thank you.
I entered the following command:
chown boardfai:mail /home/boardfai/etc /home/boardfai/etc/*/shadow /home/boardfai/etc/*/passwd

my customer entered chown and chmod for (/) directory
All the sites and services were in trouble

We fixed the site problem
But emails can not be sent from phpmail
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
my customer entered chown and chmod for (/) directory
While you may find some manual commands that you can run to help resolve the issue, it's really a better idea to install a new OS and complete a new installation of cPanel. Then, restore the accounts on the new server from backup, or by using the transfer option in Web Host Manager if you have no previous backups available.

Thank you.
 
  • Like
Reactions: Mehrdad Tari