|
|
||||
Internet Connection's Unix-based website hosting packages come with tools for creating and managing additional FTP users (authors), either from the command line using a shell or via the graphical user interface within the Netconsole . These tools are very useful for websites that have more than one person working on them. Not only can the site administrator create, modify and delete authors, but access can also be restricted to files or directories on a per-user basis.
This document explains how to add and manage users from the command line.
Note: These tools allow you to create new users with FTP and mail access only. If you need for a user to have shell access, please contact the Internet Connection support team. Additional shell accounts cost $2.50 to set up.
To create a new author, first login to your account via Telnet or SSH.
Note: We recommend that our customers use SSH. PuTTY, a free SSH client for Windows, is available here.
Once you are connected type vuseradd and hit Enter. The program will then tell you what input it expects:
$ vuseradd
Usage: /usr/bin/vuseradd [-f homedir] [-e] username
-f allow ftp into homedir
-e allow email access/delivery
$
To add a new user named "jimbob" with FTP access only (no email account) bound to a directory called "news" under webshare, first create the directory:
$ pwd /usr/share/web/user/webshare $ mkdir news $
By default, the user will not have write permission in this directory. To give the user write permission, use this command chmod g+w news/
Next, create the user. Note that you have to provide a "full" path to the directory the user is bound to.
$ vuseradd -f webshare/news jimbob Password for jimbob: Confirm Password: Created jimbob $
If you wanted to create a mailbox for this
user you would use:
vuseradd -f webshare/news -e jimbob.
$ vpasswd jimbob Password for jimbob: Confirm Password: Password changed for jimbob $
To modify an author, use vusermod. With this tool
you can change whether an author has mail and/or FTP access and which directory
they are bound to. For example, to disable jimbob's FTP access but enable
email access, you'd type:
vusermod +f -e jimbob
Again, you can simply type vusermod to get a list of the input this program can accept:
$ vusermod
Usage: /usr/bin/vusermod [-f homedir | +f] [-e | +e] username
-f allow ftp into homedir / edit homedir
-e allow email access/delivery
+f disable ftp access
+e disable email access/delivery
$
$ vuserdel jimbob jimbob deleted $
Rarely you'll encounter a problem where an FTP user will not be able to upload or modify files. This is due to incorrect group permissions on the directory that's been set as their home directory. To repair this, you must grant user write permission. This is done via SSH/Telnet:
$ chmod -R 0775 directory(ies) - OR - $ chmod -R g+w directory(ies)
Note: Some FTP clients also allow you to modify file/directory permissions. For more information on this, please see the IC Tech. Ref. Document: Understanding File Permissions
Related Items