![]() |
|
|
|
![]() |
![]() ![]() |
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
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 1) Change the directory specification in the "etc/passwd" file. test1:WC6LNEOeRdHHQ:148:100:test1:/usr/local/etc/httpd/htdocs/Billy/test1:ftp 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) ********** 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. |
|
![]() |
[ SERVERS | ECOMMERCE | SUPPORT | SPECIALS | SEARCH | SITE MAP | ORDER] [ HOME | CONTACT US | ABOUT US | PRIVACY | LEGAL | REFUND POLICY ] © Copyright 1998 - 2001 Blue Reef Consulting, Inc. All Rights Reserved. Comments or questions about this web site? Write to webmaster@bluereef.net. Phone: (305) 274-8393 |