Blue Reef Technical Support Blue Reef Virtual Server Reseller ProgramInstallation instructions, manuals, how-tos, and more!About Blue Reef Consulting, Inc.

About Blue Reef Virtual ServersEcommerce Solutions for your Virtual ServerSearch the Blue Reef Virtual Server web site
Return to Blue Reef Virtual Servers Home Page
Order virtual servers, software, computers, and more!
Return to Blue Reef Main Home Page
Specials
Site Map
Support Solutions to help you do business with your Virtual Server.



Blue Reef Virtual Servers
Virtual Server Support
Support Archive Menu
Support Archive Overview
Changing Administrative Passwords
Anonymous FTP
Frequency of the Server backup
Clearing the Email Queue
DNS Server Information
Changing FTP Directories
Internet Relay Chat
Configuring Manual Pages
Robots.txt  File
Monitoring Server Space Limits
Blocking Spam
Using the #include SSI Includes
Creating Symbolic Links
Changing the Time Zone of your Server
Unzipping Dos files in Unix
Lising Users on the Server
Frequent Questions
White Papers
Virtual Server Handbook
Request help using our Problem Tracking System
Order a Blue Reef Virtual Server now!


Changing the FTP Home Directory

"Can I change the ftp home directory? I would like to setup a structure where three users have an FTP directory in my htdocs directory... but I would like one other user to have access to each of those three users ftp directories. Is this possible?"

Quite possible!

When you set up an FTP/Mail account for each user, by default you get 3 options for the directories. Option 2 allows the users home directory to be placed in the "usr/local/etc/httpd/htdocs" directory structure so that not only will the directory be accessible via FTP but also via the web as well.

I set up (on my own virtual server) three accounts: test1, test2, and test3 and gave each an ftp directory in the "usr/local/etc/httpd/htdocs" directory structure using Option 2. If I look at my "etc/passwd" file I see something like this:

test1:WC6LNEOeRdHHQ:148:100:test1:/usr/local/etc/httpd/htdocs/test1:ftp
test2:SG.TMTcirDKac:148:100:test2:/usr/local/etc/httpd/htdocs/test2:ftp
test3:jHDYINousVz2c:148:100:test3:/usr/local/etc/httpd/htdocs/test3:ftp


Notice the ftp directory listing is included in the definition of each user. And in fact, there is are directories "test1", "test2", and "test3" in the "htdocs" directory. Now let's say that "billy" is going to be in charge of the "test1", "test2", and "test3" accounts. We would like to set it up such that we give "Billy" an ftp account/password that will allow him to have access to each of the accounts. Here's how:

Use the "vadduser" command to add an FTP/Mail account with FTP option 2. There will now be a "Billy" directory in the "usr/local/etc/httpd/htdocs" directory structure and in the "etc/passwd" file Billy will now have an entry:

test1:WC6LNEOeRdHHQ:148:100:test1:/usr/local/etc/httpd/htdocs/test1:ftp
test2:SG.TMTcirDKac:148:100:test2:/usr/local/etc/httpd/htdocs/test2:ftp
test3:jHDYINousVz2c:148:100:test3:/usr/local/etc/httpd/htdocs/test3:ftp
Billy:xLABZ9LPRmSJM:148:100:Billy:/usr/local/etc/httpd/htdocs/Billy:ftp


To make Billy have access to the "test1", "test2", and "test3" accounts, we will need to put the accounts in billy's directory. So we will want to do two things: 1) change the directory specification in the "etc/passwd" file, and 2) physically move the "test1", "test2", and "test3" account directories into the "Billy" directory.

1) Change the directory specification in the "etc/passwd" file.

test1:WC6LNEOeRdHHQ:148:100:test1:/usr/local/etc/httpd/htdocs/Billy/test1:ftp
test2:SG.TMTcirDKac:148:100:test2:/usr/local/etc/httpd/htdocs/Billy/test2:ftp
test3:jHDYINousVz2c:148:100:test3:/usr/local/etc/httpd/htdocs/Billy/test3:ftp
Billy:xLABZ9LPRmSJM:148:100:Billy:/usr/local/etc/httpd/htdocs/Billy:ftp


Notice how I added the "Billy" directory in the directory specification for "test1", "test2", and "test3"

2) Physically move the "test1", "test2", and "test3" account directories into the "Billy" directory. You can do this my using the "mv" command. In this example, I can do this my typing the following commands:

% cd (puts me in my home directory)
% cd www/htdocs (puts me in the htdocs directory)
% MV test1 Billy (move the test1 directory into the Billy directory)
% MV test2 Billy (move the test2 directory into the Billy directory)
% MV test3 Billy (move the test3 directory into the Billy directory)


We're done! Notice what both test1 and Billy see when they ftp to the virtual server:

********** here is what test1 will see *************************


% ftp ftp.church.org
Connected to www.church.org.
220 ftp.church.org ftp server (Version 4.1) ready.
Name (ftp.church.org): test1
331 Password required for test1.
Password:
230 User test1 logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/" is current directory.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/Ls
total 2
-rw-rw-r--    1 148      100             7 Dec  7 05:22 test1.html
226 Transfer complete.
ftp> quit
221 Goodbye.
********** here is what Billy will see *************************


% ftp ftp.church.org
Connected to www.church.org.
220 ftp.church.org ftp server (Version 4.1) ready.
Name (ftp.church.org): Billy
331 Password required for Billy
Password:
230 User Billy logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/" is current directory.
ftp> Ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/Ls
total 6
drwxr-xr-x    2 148      100           512 DEC  7 05:22 test1
drwxr-xr-x    2 148      100           512 DEC  7 05:21 test2
drwxr-xr-x    2 148      100           512 DEC  7 05:21 test3
226 Transfer complete.
ftp> cd test1
250 CWD command successful.
ftp> Ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/Ls
total 2
-rw-rw-r--    1 148      100             7 DEC  7 05:22 test1.html
226 Transfer complete.
ftp> quit
221 Goodbye.
SEE ALSO:

Creating FTP Accounts

FTP Utilities

Frequently Asked Questions

Featured Solutions

Administrator Handbook

Whitepapers

Recommended Books

Request help from Technical Support

BOOKS TO HELP YOU:

Apache Server : Administrators Handbook
Apache Server:
Administrators Handbook

$23.99


Unix Power Tools Unix Power Tools
$47.96


Amazon.com logo
Search for :
Enter keywords...