We were all new at some point. The leaing curve is much less these days than when I started, but it is still steep.
My best advice for people wanting to lea linux: http://blog.jdpfu.com/2014/12/28/leaing-linux
Remove vsftp. You don't want that left on the box.
Be certain that you fully understand file and directory permissions. This is the coer-stone for all Linux security - that is different than other OSes you've probably used.
Also, know that there are 500 solutions for what you are asking. Each with good and bad aspects. The way that I'd do it is
* load openssh-server
* enable on sftp access for the userid
* set the umask as needed - I wouldn't make it executable permissions for security reasons (too many to list).
* setup a cron task daily or hourly or every 15 minutes to move any uploaded files to a place that the upload userid caot see, chmod +x the files in the new directory. Don't leave executable files anywhere that untrusted FTP/sftp users can see or access.
If nobody as mentioned this, there is a help system on your linux machine already - man pages or manpages. Almost every program and config file has a manpage which describes the settings and options for control. man ssh_config will show the options to control the umask, if you insist on doing it that way. Again, I wouldn't, but it is your box.
BTW, there is also a manpage for the sftp-server ... which says something about chmod. http://linuxcommand.org/man_pages/sftp1.html or just look on your box.
برچسب:
نویسنده: استخدام کار