Mashups, APIs, Website Information Shared...

Archive for the ‘Tutorial / Tip’ Category

How to Create Another FTP Account in Plesk

Monday, November 23rd, 2009

Plesk Logo

If your on Mediatemple.net (like WebServiceable.com) you are probably very pleased with the overall performance. Speed, uptime, support response and even copyright infringement accusations (:))

But the worst part about MediaTemple DVs is Plesk. Well that’s not true, plesk is great BUT there are few holes. One of which is being able to create additional ftp clients. I’ve struggled with this for ages and I decided to post the solutions that are available (as of the time of this post)

1. Create FTP Account Manually Through SSH
This process is fairly simple and is actually suggested by Plesk in their knowledge base. With that being said I do prefer the 2nd method i’ve listed after. I’ve summarized both below. (btw, thanks to marc for digging up the original plesk article for me)

NOTE: this method will not show the created ftp accounts in plesk, use the 2nd method below to have ftp users show up in plesk.

This process requires SSH access and (which has to be enabled on mediatemple) and a keyboard.

  1. ssh into your host (using terminal in osx or putty on windows)
  2. add the user with:
    /
    usr/sbin/useradd -d /full/server/path/to/users/folder -s /bin/false NEW_FTP_ACCOUNT_USER_NAME
  3. add user to the ftp group “psacln” with:
    usr/sbin/usermod -G psacln NEW_FTP_ACCOUNT_USER_NAME
  4. now make sure permissions are peachy
    chmod
    755 /full/server/path/to/users/folder
    chown
    NEW_FTP_ACCOUNT_USER_NAME:psacln /full/server/path/to/users/folder
  5. Set password for this new user:
    passwd NEW_FTP_ACCOUNT_USER_NAME


2. Enable FTP Access for a Plesk Web User

This next method MAY create some security hole, which I don’t know about but it is alot cleaner in as it does integrate with plesk. (p.s thanks to updel.com for the original source on this)

  1. Create Web User for your domain
  2. SSH into your site as root
  3. with your favourite editor (pico/nano/vi, I like nano because its easier) open up passwd:
    nano /etc/passwd
  4. Change the uid for your new web user to the uid of default user for your ftp.

    defaultftpuser:x:10001:2524::/var/www/vhosts/domain.com:/bin/false
    newwebuser:x:10002:2524::/var/www/vhosts/domain.com/user/:/bin/false

    becomes:

    defaultftpuser:x:10001:2524::/var/www/vhosts/domain.com:/bin/false
    newwebuser:x:10001:2524::/var/www/vhosts/domain.com/user:/bin/false

    Note: that the path you see is the absolute path that the ftp user will have access to. Change this to the path you want :)

  5. Exit your editor and save.
  6. FTP IN!