Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Script to fix user and group permissions?

Discussion in 'Security' started by mzuker, Apr 24, 2018.

  1. mzuker

    mzuker Registered

    Joined:
    Apr 24, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    chile
    cPanel Access Level:
    Root Administrator
    do you have an script to automatically fix user and group permissions in all the server?

    by mistake we run a script to upgrade all wordpress and plugins as root user, now root user is the owner of all wordpress and plugins in the server for hundred of accounts.


    we didnt fix this yet,
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @mzuker,

    We don't provide any scripts that will automatically repair the permission and ownership values. Do you have backups of the accounts? If so, we typically recommend restoring the accounts from backup to address this type of issue. Or, in the event the command was ran for directories outside of /home as well, we recommend moving the existing backups to a remote location, reinstalling the OS/cPanel, and then restoring the accounts from backup.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. mzuker

    mzuker Registered

    Joined:
    Apr 24, 2018
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    chile
    cPanel Access Level:
    Root Administrator
    i understand, but we have hundred of accounts affected and the backup is on amazon, so dont want to fix them one by one
    only need to fix the user and group permission of user accounts files inside public_html so there will not keep some files and folders with root user and group
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    You may find the user-submitted script on the following thread helpful:

    suphp breaking WP sites

    However, keep in mind it's unsupported, and it's typically not a good idea to change permission/ownership values recursively because it's possible a file is supposed to have lower permissions or different ownership values.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice