LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 03-30-2009, 06:21 AM   #1
apatonz
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
want to undo fstab edit


Hi everyone,

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?

Thank you so much in advance.
 
Old 03-30-2009, 06:35 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Welcome to LQ!!

I'm not sure what you mean by "unmount the fstab file". fstab is required to tell the system what partitions (filesystems) to mount at boot time.
 
Old 03-30-2009, 06:41 AM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
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.
 
Old 03-30-2009, 06:56 AM   #4
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,613

Rep: Reputation: 433Reputation: 433Reputation: 433Reputation: 433Reputation: 433
apatonz:

1)
your question:
"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.

2)
you did:
"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.

Goodluck.

Hope this helps.
 
Old 03-30-2009, 07:13 AM   #5
apatonz
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hello

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.
 
Old 03-30-2009, 07:14 AM   #6
apatonz
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
btw ... Yes all the files in the /home directory came back when I reinstated the line in fstab
 
Old 03-30-2009, 07:22 AM   #7
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,063

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Quote:
Originally Posted by apatonz View Post
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).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
edit /etc/fstab ricnoah Red Hat 3 07-23-2007 07:26 PM
fstab not edit-able? lefty.crupps MEPIS 1 06-06-2005 06:36 PM
How do I edit /etc/fstab? linusownsme Linux - Software 9 03-05-2005 12:30 PM
Help me edit my fstab Slovak Slackware 3 11-26-2004 11:12 AM
edit fstab LinuxOG Linux - Distributions 2 09-01-2003 11:27 AM


All times are GMT -5. The time now is 05:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration