The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Owner permissions keep going bad.

Discussion in 'General Discussion' started by tommytx, May 12, 2016.

  1. tommytx

    tommytx Member

    Joined:
    Mar 30, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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.
     
  2. webhostuk

    webhostuk Well-Known Member

    Joined:
    Sep 11, 2013
    Messages:
    55
    Likes Received:
    6
    Trophy Points:
    8
    cPanel Access Level:
    Website Owner
    you got to manual login to the server and fix the ownership of the respective folder using Shell access or do it from Cpanel filemanager section.
     
  3. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    326
    Likes Received:
    24
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
  4. tommytx

    tommytx Member

    Joined:
    Mar 30, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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..
     
  5. tommytx

    tommytx Member

    Joined:
    Mar 30, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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..
     
  6. tommytx

    tommytx Member

    Joined:
    Mar 30, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,834
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  8. tommytx

    tommytx Member

    Joined:
    Mar 30, 2006
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    1
    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
     
    #8 tommytx, May 27, 2016
    Last edited by a moderator: May 28, 2016
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,471
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Files removed, no need here.

    Are you running SuPHP on this server?
     
Loading...

Share This Page