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.

Permissions of additional FTP users

Discussion in 'Security' started by Weboz, Jan 28, 2013.

  1. Weboz

    Weboz Member

    Joined:
    Jan 28, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hallo, have a VPS license (WHM & Cpanel).

    When creating a new FTP account through Cpanel, like "ticketsys@domain.com", I can't overwrite existing files.
    How can i changes the permission for this account? I want to allow this user everything in a specially folder.
    (Like in folder /public_html/billing/sys).

    Thanks, hope some one can help me! :)

    Regards,
    Christian.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    When you create an addon FTP account, and login using that addon account's log in details "ticketsys@domain.com" for example, you should have access to overwrite and delete files in the directory you're in. Were these files that you cannot overwrite there, previous to creating this addon FTP account? Can you check the owner of those files you're unable to overwrite to see who the owner is?
     
  3. Weboz

    Weboz Member

    Joined:
    Jan 28, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for fast reply.

    Before i created the FTP account i used the root account to upload the files. How do i change the "owner" of the files ? So my new account have all permissions.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    So the files are owned by root then, this is why you can't modify them logged in as an addon FTP user. You could run a command on the directory of files to change ownership if you're comfortable doing that, or you might login as root, kill the files you uploaded and then re-upload them as the cPanel account owner. Might be safer and easier depending on you.
     
  5. Weboz

    Weboz Member

    Joined:
    Jan 28, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    So i can't change some settings in the WHM to turn this function off?
    Theres alot of files that are connected to databases and cron jobs. I'm not satisfied with deleting all files and re-uploading it. May effect some of the files. What kind of commands can i run to swap owner?
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    No. There is no function to turn off, it's a file ownership issue. It seems.

    If the files are owned by root, they are already, affected. Running commands that you're not sure of on a server can make a real mess and have an affect on the entire server.

    Just ask this guy: Chown Nightmare - cPanel Forums
    Or this guy: Big Problem - I accidently chmod 000 a lot of files! - cPanel Forums

    One file:
    chown weboz:weboz /home/weboz/public_html/pathto/file

    An entire directory and all files in it:
    chown -R weboz:weboz /home/weboz/public_html/pathto/directory
     
  7. Weboz

    Weboz Member

    Joined:
    Jan 28, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks!
    Before i do the changes, could i go to:
    cd /home/[account]/public_html/billetter

    And then perform the command chown -r [account]:[account] ? Will all files in the dircetory i'm currently in change?

    shouldn't it be root:[account]? root are the currently owner of the files.. Or should it be like you wrote it [useraccount]:[useraccount] on both side of the ":"?

    Thanks you so much for your help, really appreciate it.
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You're certainly welcome. :)

    Assuming that your server is running SuPHP, all files and directories inside should be user:user

    public_html itself, should be user:nobody and nothing in this account, inside public_html directory should be owned by root.

    If needed, you might create a test directory, add some random files as root user to the directory, and then change permissions on them to experiment. For example:

    chown -R weboz:weboz /home/weboz/public_html/pathto/testdirectory

    Keeping the full path in the command should keep you out of trouble for the most part.

    GL!
     
  9. Weboz

    Weboz Member

    Joined:
    Jan 28, 2013
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    @Problem solved.

    Thank you again! :)
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,449
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Great news then! :)
     
Loading...

Share This Page