I'm sorry for uber noobish question, I'm new to linux and trying to learn and practice secure LAMP administration for upcoming little project of mine.
I've installed vsftpd but can't setup permissions the way I want. It seems that files in /var/www must be owned by user www-data (default on ubuntu) so apache can read and write there, but I would like to upload files directly to /var/www and be able to edit them over FTP using notepad++ from windows box. Now, I can't access FTP with user www-data since I don't know the password, so I created new user webmaster but then apache can't access files due to different owner. In my anger I tried to set anonymous FTP access just to get this working, so in vsftpd.conf I've allowed login and file creation by anon and set it to make new uploads owned by nobody, but then I can't upload anything at all.
So how can I make this work? I want files in /var/www to be secure, only accessible by apache from within the system and ftp deamon. I'm talking of unsecured FTP for now, will try to learn FTPS or SFTP later.
My idea on production server was to login via SSH, enable FTP(S), beam files, disable FTP, logout. This is how it's being done in real world?
Thanks for your answers.