LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to setup ftp user's diretory as /var/www/html (https://www.linuxquestions.org/questions/linux-software-2/how-to-setup-ftp-users-diretory-as-var-www-html-46866/)

lzyking 02-24-2003 02:26 AM

how to setup ftp user's diretory as /var/www/html
 
I want to setup a ftp in order to transfer file in /var/www/html which is the root file in apache , how to do it

keevitaja 02-24-2003 05:35 AM

i am not sure what you are after, but users home directorys are located in /etc/passwd

Crashed_Again 02-24-2003 09:39 AM

More info please.:D Do you want everyone to be able to ftp to your /var/www/html?(I hope not) Why do you need people to be able to ftp to your web server? How many users need this access?

rewt 02-25-2003 07:47 AM

what FTP server are you using?

I am sure this varies with different server software.


A Thought just came to mind. Why dont you just give the user group write access that needs to FTP to that Directory and then set your FTP program remote folder for /var/www/html and then upload away.

again I dont know what server software you are using but with proftpd I have all my users chrooted with this directive:
DefaultRoot ~
To get past that with one user you can add this line to your /etc/proftpd.conf

DefaultRoot ~ !user

This says everyone is chrooted but not user.

Hope this has helped in some way.

Rewt

MasterC 02-25-2003 12:58 PM

Along with the defaultRoot ~ (or the version of that for your FTP server) you can also make the user's home directories (which is the reason for the default ~) /var/www/html by editing /etc/passwd and changing that user's home directory. However, if you want everyone who ftp's into your box, whether it's anon or not, to have /var/www/html as their home directory, change:
DefaultRoot ~
to
DefaultRoot /var/www/html

You will have to give alot of permissions to that directory if you go that route(read/execute world, r,w,x group/owner).

Cool


All times are GMT -5. The time now is 02:02 PM.