Owner permissions keep going bad.

tommytx

Member
Mar 30, 2006
23
0
151
In variably when I try to update a site, i get a problem with the update being able to write to directories as it needs to do so to make the update.. so I find myself frequenlty on updates having to delete the entire program since on install if a directory cannot be written to it will complain and tell me that so I can change its write capability or even make that directory. but with the updates i dont get a warning.. just cant update... so the failing directory is not called out.. Is there a way to go in an run something to make sure all the sites on the server using cpanel correct all the owner ship problems on all sites on the server or even run it just on the site in question.
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter

tommytx

Member
Mar 30, 2006
23
0
151
Thanks for the input... however i have winscp to visit my site in question plus i viistied the root where all 100 of my sites reside and looked at each and every site..and they all look the same in directores and files the correct owner is identified on both the directories, site and each file.. and root is not the boss on any... so I am at a loss as to why anytime i try to update it will not allow writing or creating a directory.
Each time I try to update I get the following..

Could not create directory.
yoast update:
/public_html/wp-content/plugins/wordpress-seo/
404-to-301 update:
/public_html/wp-content/plugins/404-to-301/

So normally i can delete the plugin and make that directory and it will then load the plugin from scratch.. however its not possible to run an update due to fail to create a directory..
I just assumed it was a owner mismatch.. but does not seem to be...
I thought about running the below shell pgm but not sure that will help since it appears all the owners are correct..
(unless I do not know what i am looking at) any suggestions to check would be greatly appreciated..)

<begin code>
#!/bin/sh

while read inputline
do
uid="$(echo $inputline | cut -d: -f3)"
if [ $uid -gt 500 ]
then
user="$(echo $inputline | cut -d: -f1)"
cd /home/$user
chown $user:nobody public_html
cd public_html
chown -R $user:$user *
fi
done < /etc/passwd

exit 0
</endcode>

I would feel safer if I knew how to convert it to work on just one site if possible.. but i really don't see anything wrong with the owners... and I also made sure the directories it complained about were writable..
 

tommytx

Member
Mar 30, 2006
23
0
151
Just confirmed by loading up an outdated 404 to 301 plugin.. and it loaded fine.. it was able to write to the site just fine.. however as soon as I clicked the update button it tried to update and came back with cannot create the 404 to 301 directory.. and this is a different site on the same server.. so apparently the entire server has lost its mind.. I mean write capabiilty...but only on update.. not sure what the difference is between permission to write initially and permission to write once the directory is there... maybe it needs to delete the old directory and cant do that so it cannot write a new one... its driving me crazy..
 

tommytx

Member
Mar 30, 2006
23
0
151
Problem still not solved... I found an old thread here:
fixing file ownership
that suggests that the "public_html" directory needs to be changed to group "nobody" is this an old idea or could it help my problem?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

What's the specific error message you see in /usr/local/apache/logs/error_log when encountering this issue?

Thank you.
 

tommytx

Member
Mar 30, 2006
23
0
151
Thanks for your offer to help... I packed up the server log errors for the day and posted here
- Removed -

Two files one is the entire error log file for today.. and the other is the notes given when plugins are failing to update due to what appears to permissions out of whack..
I did try to update two plugins twice in the last hour.. and I suppose you could search the log file for any activity on the user name mlstampa since that is the specific site with problems.. (course most of them have the same problem but this one is the most important so if I figure out this one the rest should follow in line..
The two plugins were 404 to 301 plugin and Akismet.. not concerrned about either one but they are good examples as to what occurss with any update..
Any way not sure what all that is.. so I sent todays entire data.. if I can provide any other info that may help analyze it please let me know... the site of most interest is tampahomesold.com

Note: even the entire day for the 27th is included.. the plugin attempt update occurred between the 8:00 pm to 9:00 pm eastern time here in Virginia beach.. and the user name is "mlstampa"

Location of data again.. 2 text files..
- Removed -

thanks in advance..
Tom
 
Last edited by a moderator: