Class AddFtpGuestUser
java.lang.Object
com.aoindustries.aoserv.examples.ftp.AddFtpGuestUser
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 Summary
Modifier and TypeMethodDescriptionstatic UserServer
addFtpGuestUser
(AoservConnector conn, Account.Name packageName, User.Name username, User.Gecos fullName, Group.Name group, DomainName server, PosixPath home, String password) Adds aFtpGuestUser
to the system.static void
addFtpGuestUser
(SimpleAoservClient aoClient, Account.Name packageName, User.Name username, User.Gecos fullName, Group.Name group, String server, PosixPath home, String password) Adds aFtpGuestUser
to the system.
-
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 aFtpGuestUser
to the system.- Parameters:
aoClient
- theSimpleAoservClient
to usepackageName
- the name of the package to add the account tousername
- the username to allocatefullName
- the full name of the usergroup
- the name of the Linux group they can accessserver
- the hostname of the server to add the database tohome
- the directory the user has access topassword
- 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 aFtpGuestUser
to the system.- Parameters:
conn
- theAoservConnector
to usepackageName
- the name of the package to add the account tousername
- the username to allocatefullName
- the full name of the usergroup
- the name of the Linux group they can accessserver
- the hostname of the server to add the database tohome
- the directory the user has access topassword
- the password for the new account- Returns:
- the new
UserServer
- Throws:
IOException
SQLException
-