Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I recently migrated to a new server with linux fedora 9 Everything was going swimmingly during set-up when I had an error message that Virtualmin could not start because it was not configured to work with SuExec. I googled the web and found a solution which was to edit the fstab file adding: /var/www /home none bind 0 0. On reboot Virtualmin worked and all seemed well until I tried to sftp or sh as a user not having the right permissions. I put SELinux in 'permissive' mode for awhile to see if that helped but when it made no difference I put it back to 'enforcing' and now all the sites have gone down and I am getting root errors in the log files. Now SELinux is back to being in permissive mode so my clients can get their websites and email.
I feel all these problems are from me editing the fstab file, so I removed the line I put in, rebooted but all the sites went down again, including losing all the files in the home directory. I had to put the line back in the fstab file to get httpd back up and working.
I am so frustrated that I feel I should reinstall and start again, this time not touching the fstab file. Before I go to that monumental task, does anyone know if I can umount the fstab file without losing all the files in the home directory?
And in any case, even if I can't understand your post completely, by the sound of it you have just messed up the permissions in one or another way. Whatever you added in fstab shouldn't be your problem, since it was just a line that you just added and removed.
I have no idea what to suggest because I have no idea of the initial setup, and I have no idea either of what did you exactly do with it to change it's permissions.
"Before I go to that monumental task, does anyone know if I can umount the fstab file without losing all the files in the home directory?"
BTW, 'umount' is a command to unmount "file systems" and fstab is a plain configuration file not mountable either as byte or block. If you want to 'disable' fstab you may just rename it, but then your important filesystems like /, proc, swap shall not be mounted automatically. You'll have more problems then than what you face currently.
"I feel all these problems are from me editing the fstab file, so I removed the line I put in, rebooted but all the sites went down again, including losing all the files in the home directory. I had to put the line back in the fstab file to get httpd back up and working."
So, when you did it were the files in /home directory restored or recovered after that? Please tell us more.
Sometimes you don't need remove a line from fstab, simply commenting it will do the exclusion (it will not be read).
BTW, httpdaemon is launch through the init.d scripts (or rc.d) it runs behind the scene with or without fstab editing.
If you apply the trick in fstab, mounting /var/www /home none bind 0 0 you may add users options into the line so that it will be accessible to your username and your clients'. Remember that in modern linux kernels where d-bus runs automatically we sometimes face problems on "permissions" either from the messagebus itself or from the mounted points. Dbus respects fstab, so you may specify the user privileges including rw into the fstab line. Try check your permissions from both.
Also, check that the network users are "members" of certain "group" that has access to both messagebus and shared files.
I now clearly understand that I didn't kill the server with my fstab line; I just need to add users to that line. I will read about fstab to see how I accomplish that.
For some reason all the home files are now chmod 755 ... something I didn't do and so it might be a separate issue. When I reverted them back to chmod 644 the sites went down again!! Also I am not happy that I can't use SELinux, which I used without a hiccup on my last server for a couple of years.
Thanks so much to all that replied, especially Malekmustaq for your indepth reply.
btw ... Yes all the files in the /home directory came back when I reinstated the line in fstab
I don't know what were you exactly trying to fix with that line. What that line does, actually, is to bind a given location A in your fs to another given location B, so B will have inside the same things you can reach in A. When you unmount something nothing is lost, you just unlink something from your fs. Just mount it again to gain access again.
You should really learn the basic of mount/umount, chmod and a few other things if you are going to be administering a server, otherwise I predict a dark future for your server. Randomly throwing lines that you see around in a forum into critical system files without actually understanding what do they do is a bad thing (tm).