What ftpd are you using?
Proftpd and a few others, set it up so that when the user logs in, they are locked into thier home directory. SO, either set the webcontent directory as thier home, maybe a symlink in thier home, or disable that feature.
I have it working but can login to my home directory but can't get it to work so I can login to /var/www to edit the website. When I couldn't get user daniel working so I could login to /var/www I made a new user admin with home directory /var/www and in the same group as apache. I still can't login to eat. I've read several tutorials but still can't get this to work. How should I go about setting up a user to access /var/www?
What ftpd are you using?
Proftpd and a few others, set it up so that when the user logs in, they are locked into thier home directory. SO, either set the webcontent directory as thier home, maybe a symlink in thier home, or disable that feature.
And make sure user admin is writable to /var/www.
its proftpd
Ok, then look at /etc/proftpd.conf file, for aline like this:
# Use this to excude users from the chroot
DefaultRoot ~ !adm !poo !jester
This shows that the default root for each user is their home dir, ~. EXCEPT for adm (which doesn't exist), poo, and jester. Those users are allowed to leave thier home directories and go elsewhere.
Just a tip that I've put in place and it works for me:
Ditch ftp altogether. It's not necessary and it's constantly being hacked (some more than others). You have an ssh daemon built-in, and it sounds like your users aren't really anonymous. Even if they are, you can setup a shared account - NOT called 'anonymous'. Shared accounts aren't secure as a rule (anytime people share an account, it's not secure), but it beats allowing anyone in the world to log in as anonymous.
Yes, you CAN do file transfers with sshd. Do 'man scp'. It works pretty much like ftp (I use it more like nfs: 'scp bitchass:/home/njcajun/*.mp3 .'), and it's much more secure. Also, it's a little less work.
If you were opening up a public ftp resource for the world, I'd say go with ftp. If it's a limited, known user group, give them accounts and tell them to ssh. You'll be MUCH safer. I sleep better with only the ssh port open on my firewall (and only during certain hours).
sshd is probably already installed. As root, run '/etc/init.d/sshd start'. The O'Reilly ssh book is awesome if you wanna do stuff later like encrypted X forwarding, but for simple file transfer, you may not have to change your config at all.
my $.02
i already use ssh for some things but this is used for misc file transfers. Sometimes I'm at school on the wonderful win95 machines so I just open up ftp login upload and i'm out.
how do I get more infor on how to use ssh for file transfer?
Man! you are bring up all those dead threads, aren't ya??how do I get more infor on how to use ssh for file transfer?
SSH is for remote log in but not for file transfer. File transfer is done through SCP ( secure copy ). You can read how those works in http://www.openssh.org .
HTH....
Bookmarks