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.

FTP Permission Issue

Discussion in 'General Discussion' started by lloyd252, Feb 21, 2012.

  1. lloyd252

    lloyd252 Member

    Joined:
    Sep 24, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I added a new site to my server and in the process uploaded a folder with many files and sub-folders to the root directory of the new account using my root credentials.

    So the folder was uploaded to /home/newaccount/public_html and was uploaded via FTP as (server)root.

    I created an FTP user for the account. they can access the folder but not upload any new documents or create subfolders due to the permission.

    What do I need to do to allow them to upload into the folder?
     
  2. TheSidewinder

    TheSidewinder Active Member

    Joined:
    Jul 18, 2009
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    If I've understood you correctly, you need to CHOWN all the files in /home/(account-name)/public_html to be owned by the account user rather than the root user.

    I'm guessing at the moment they're owned by root:root or 99:99 ??

    If so, this can be done with SSH:

    chown -R account-name:account-name /home/account-name/public_html/*
     
  3. lloyd252

    lloyd252 Member

    Joined:
    Sep 24, 2010
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    Perfect. Thanks.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Keep in mind it's a good idea to upload files/directories while logged in as the user. This will ensure correct ownership of the files at the time of upload. The "chown" command is useful, but it's important to be careful when using this command recursively. There may be some files/directories previously uploaded that you may not want owned by the account username.

    Thank you.
     
Loading...

Share This Page