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!

change owner of files

Discussion in 'General Discussion' started by bhanuprasad1981, Nov 30, 2011.

  1. bhanuprasad1981

    bhanuprasad1981 Well-Known Member

    Joined:
    Aug 5, 2008
    Messages:
    222
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    India
    one of my customer requested to restore his public_html/some folders as he mistakenly deleted them i tried to copy those files from a previous incremental backup but the problem after restore is ownership of files and folders they all belong to root instead of user how to fix this ?
     
  2. NixTree

    NixTree Well-Known Member

    Joined:
    Aug 19, 2010
    Messages:
    407
    Likes Received:
    3
    Trophy Points:
    143
    Location:
    Gods Own Country
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Run the following command from SSH, as root.

    chown -R user:user <directory full path > - here user is the user name

    Make sure that, you will specify the correct path when you run above command. An incorrest path can cause seriuos issues!

    Thank you,
    Nibin.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Of note, the top level of /home/username/public_html needs to be username:nobody rather than username:username for the account. This means you should use this instead:

    Code:
    cd /home/username
    chown -R username:username public_html
    chown username:nobody public_html
     
    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