FTP and my Website

jspears80

New Member
Hi,

I use Linux Mint 12.

I use apache2 for my web server.

I use vsftp for my ftp server.

My website is in /var/www.

From what I understand of FTP is:
-each user has their own home directory (including anonymous)
-when users access the ftp server they only get access to their directory

My problem is that I apparently don't understand how to use FTP to manage my web server. I need to be able to FTP files into /var/www but am not able to because users only have access to their home directory.

How do you setup your FTP server to manage your website?

(after typing all this I just thought that maybe creating a user specifically for the website and changing their home directory to /var/www. Would that work or is there a better way?)

Thanks in advance!
-jspears80
 

Cromewell

Administrator
Staff member
The easiest way is to do exactly what you think, set home directories to /var/www/user (or if you just want 1 web user, /var/www/). You can mess with the chroot settings but that will probably get you into trouble before it gets better.

Or you could set up a cron job to monitor directories and copy the appropriate ones to your www.
 

jspears80

New Member
Thanks for your response.

I am now having a problem creating a user that has the ability to write to /var/www.

My procedure has been:

adduser liljoe
passwd lilejoe
usermod -d /var/www

I believe the owner of /var/www is root so I have tried changing ownership with chmod but that doesn't seem the work. I may be typing it in wrong. When I get off work I will be reading up on user management in linux, but it would be nice to do this all with one command (or two... lol).

I want to create a user with the home directory of /var/www with permissions to write to it. Is there a clean single command that can accomplish this?
 

Cromewell

Administrator
Staff member
chown to change owner. Otherwise the commands are ok. It might end up a bit ugly, one of the more unixy folks here can probably help you set it up in a smarter way. I mostly just know the commands that let you do stuff :p

Is there only going to be the 1 user able to ftp in files for the web?
 
Top