Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After about four years of running a Windows Server and learning it inside an
d out, I think I'm ready for some change. Looks like I'm going to go with T
inySofa Classic Server, I've tried a number of others but TinySofa seems to
be right for me.
I was going to switch everything over earlier to another box so I could mess
with TinySofa on my production server and use my current TinySofa box as my
webserver but I ran into a few problems and thought I'd better hold off.
I'll have a number of questions, so get prepared...
I'll start off with a few...
1. Security... Security... Security...
What to do, what not to do, etc.
I believe I pretty much got the basics covered but jsut want some more info.
2.When creating a new user, how would I go about having a public_html folder
created under that user's home directory and have permissions automatically
set so Apache can access it? (Automation is key)
This is related to my second question, when a user uploads a file via FTP th
e permissions aren't right for Apache to be able to read it. How would I go
about getting that straight so I dont have to change the permissions for ev
ery new file?
Thanks for that link, I can go off that for alot of good information.
Since that covers my security question, what about the others. I tried searching for a few things regarding my other questions but I haven't got anywhere so far.
You can place files that you want all new users to get in "/etc/skel/". It should set the permissions to something like 644 automatically i think.
For the correct permissions, somewhere in your ftp servers configuration, it should set a standard Umask. It works in the opposite way of normal permissions. A umask of 000 will allow everyone everything, while 022 will remove write access to group and other, and is probably want you want. (default perms will then be 644)
ttolst, That did the trick, I came across both those things before but didn't have enough information to know what they were used for or how they are used..
I haven't tested my new vsftpd config yet but I'm assuming its going to go right...
Well, didn't think about posting this before but how would I get the permissions changed on the user's home directory automatically when creating a new user?
hrm, this might vary from distro to distro. In debian, the adduser man page says this:
If the file /usr/local/sbin/adduser.local exists, it will be executed after the user account has been set up in order to do any local setup. The arguments passed to adduser.local are: username uid gid home-directory
But i am almost certain that this adduser command is debian specific, but you might want to check out the man pages for useradd, and if it exists, adduser.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.