Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    TJP
    TJP is offline
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Question CPanel FTP users and chown "invalid user"

    We're moving from an old server on Plesk 8 to a new server with CPanel (since Plesk 9 and 10 are virtually unusable). Everything seems to be going mostly ok. However when we set up folders in SSH and then configure users for them through CPanel (let's say one of the folders is /home/mainuser/data/collection/ftpuser/), we discover that the folder is still set to root and can't be FTP'd to (though connecting works just fine). And when I try to chown -R ftpuser ftpuser to fix that, it says that ftpuser is "invalid user".

    Things I've tried so far:
    ---------------------------------
    Using ftpuser@mydomain.com instead of ftpuser (we have a static IP for this particular domain, but just in case)
    Looking in /etc/passwd to see if the user was listed there (it wasn't)
    Rebooting the FTP server (Pure-FTPD)
    Rebooting the SSH server
    Rebooting the entire server

    The core problem seems to be that the users configured through CPanel are not showing up in the /etc/passwd list. Why?

  2. #2
    TJP
    TJP is offline
    Registered User
    Join Date
    Apr 2011
    Posts
    2

    Default Re: CPanel FTP users and chown "invalid user"

    I forgot that I could just chmod to 777 and have it work regardless of user. I tried doing that, and noticed that when I put in a file, the file got set to the user for that particular domain (mainuser) rather than the FTP user (ftpuser). So I tried creating a new test folder (/home/mainuser/data/collection/ftpuser2/) and setting the owner to the domain user (chown -R mainuser ftpuser2), then setting up an FTP user (ftpuser2) for that folder through CPanel. It worked, so as far as I can tell. I can log in with the FTP user and put in files, and I don't have to chmod to 777. As to why CPanel doesn't create the folder itself, I don't know. Does the folder specified have to be in an area owned by the domain user (mainuser), or is that process run by root and something is going wrong, or what?

  3. #3
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    6,305
    cPanel/Enkompass Access Level

    Root Administrator

    Default Re: CPanel FTP users and chown "invalid user"

    For addon or subdomains, you can use the addon or subdomain name to log into FTP for that addon or subdomain, but all files on a user's account must be owned by the cPanel main user.

    For FTP accounts that aren't tied to an existing domain, you can create additional FTP users in cPanel > FTP Accounts area. When trying to connect to FTP as that FTP account user, you'd use ftpusername@domain.com where domain.com is the main domain name. When you configure the FTP user account in cPanel > FTP Accounts area, you can specify the folder that it will use. It should create the folder if it doesn't already exist at the path /home/username/public_html/ftpusername or whatever you want the folder to be called.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Forums Technical Analyst, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads & Tags
Similar threads

  1. /webmail asks users for "username" not "email address"... why?
    By ryno267 in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 08-07-2006, 09:22 AM
  2. cpbackup states "Invalid user <username>"
    By zorka in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 10-03-2004, 08:53 PM
  3. Grant user FTP access to "RESTRICTED" directories
    By Roy@ENHOST in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 07-24-2004, 06:13 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube