java.lang.Object
com.aoindustries.aoserv.examples.ftp.AddFtpGuestUser

public final class AddFtpGuestUser extends Object
An FTP Guest User is a restricted Linux Account. The account is allowed to transfer files via FTP only. The account may not be used for use as an email inbox. If the user logs into the server via SSH or telnet, they are allowed to change their password and then they are immediately disconnected.

FTP Guest Users may only transfer files into and out of their home directories. By making the home directory of the user be the /www/sitename/webapps directory, the account is effectively restricted to accessing and updating the content of a single web site. Keep in mind, however, that the user may still upload code that can access files outside the site.

Author:
AO Industries, Inc.
  • Method Details

    • addFtpGuestUser

      public static void addFtpGuestUser(SimpleAoservClient aoClient, Account.Name packageName, User.Name username, User.Gecos fullName, Group.Name group, String server, PosixPath home, String password) throws IOException, SQLException
      Adds a FtpGuestUser to the system.
      Parameters:
      aoClient - the SimpleAoservClient to use
      packageName - the name of the package to add the account to
      username - the username to allocate
      fullName - the full name of the user
      group - the name of the Linux group they can access
      server - the hostname of the server to add the database to
      home - the directory the user has access to
      password - the password for the new account
      Throws:
      IOException
      SQLException
    • addFtpGuestUser

      public static UserServer addFtpGuestUser(AoservConnector conn, Account.Name packageName, User.Name username, User.Gecos fullName, Group.Name group, DomainName server, PosixPath home, String password) throws IOException, SQLException
      Adds a FtpGuestUser to the system.
      Parameters:
      conn - the AoservConnector to use
      packageName - the name of the package to add the account to
      username - the username to allocate
      fullName - the full name of the user
      group - the name of the Linux group they can access
      server - the hostname of the server to add the database to
      home - the directory the user has access to
      password - the password for the new account
      Returns:
      the new UserServer
      Throws:
      IOException
      SQLException