Automounting directory in fstab troubles
I have three directories I would like to mount when the system boots up. I tried to add them in the fstab but I am having alot of trouble. The system keeps telling me that it is write-protected mounting read-only.
My fstab: ... /var/www/html /home/username/WebServer none bind 0 0 /fileserver/ftp /home/username/FTPServer none bind 0 0 /fileserver/Projects /home/username/Projects none bind 0 0 Out of desperation I set each of the original directories to root:root and 777. But that didn't help. When I wait and do this from a terminal as root I have no problem. One other unrelated curiosity that started well before all of this. When booting I see FATAL : ERROR acpi-cpufreq (lib/moduless/2.6.28-1.2798.fc6/kernel/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.ho) no such device. Any hints on these? ************************* System Config: AMD 2400+ 120 GB HDD 1 250 GB HDD 2 1 GB RAM |
Cpufreq controls throttling the processor, so it's primarily for laptops. That message should just mean cpufreq couldn't find a cpu that it can work with.
The other problem I'm afraid I don't know about. I've seen it before, on a PCLinuxOS .92 load, but I never fixed it before I changed distros. |
What are /var/www/html, /fileserver/ftp and /fileserver/Projects?
Are they just directories that you want a link, or shortcut if you will, to in home directory?? If so I don't think you can do that. Reading the fstab man page here it appears the first parameter in fstab needs to either be a block device, i.e. /dev/hda2 or an NFS filesystem sitting on a server. Are you sure the /fileserver lines shouldn't be something like "fileserver:/ftp" instead of "/fileserver/ftp"?? If you just want a link to /var/www/html/ in your home directory use 'ln -s <src> <dest>', i.e. 'ln -s /var/www/html ~/WebServer' |
Thanks Somnium, I go the acpi_cpufreq resolved I found a thread on another board talking about something similar that cleared up when he updated his kernel. I did that this evening and I am flying high with out the error.
Micky, I am still working on the mounting issue. I originally tried the softlink but I have chroot enabled on my ftpserver and I wanted to be able to access those locations from ftp. In that scenario the only thing I have found thus far is a bind. You asked what are /var/.... from mount: /dev/hdb1 on /fileserver ext3 /dev/hda2 on /var ext3 /var/www/html ofcourse is my Web directory /fileserver/ftp is the root directory for the FTP Server /fileserver/Projects is a directory I setup to store all of the software or graphics projects I work on. And once I figure out how to do this properly I was going to setup a directory off of /fileserver for documents. Thanks for help me with this one. |
Well it took a little bit of time but I found it. To bind from one dir to another from fstab
Quote:
|
First you need to get the mount points right before you worry about linking them to another directory:
/etc/fstab Code:
/dev/hdb1 /fileserver ext3 defaults 1 2 Code:
/dev/hda3 swap swap defaults 0 0 |
Hey fotoguy,
I almost understand about the mounting points being correct. But is there something wrong with the way that I did the bind for those directories? If there is I have no qualms with changing it. I am no guru, I just know enough to be dangerous. My current fstab: Code:
LABEL=/ / ext3 defaults 1 1 |
Quote:
OK I can see now what you are doing by your fstab, mounting a directory to another directory. Unfortunately I have never used bind in the fstab before, so I cannot say where this is the right or wrong way to go about it, nor have I mount two directories together. But since your having read/write errors, when you mount to directories you now have permissions on both directories to contend with, plus mounting options that can also effect read/write on files and directories. Since only root can create directories on the root filessystem /fileserver will have root as owner and group, and user john will be owner and what ever the group is that he is part of. While root has complete control of the system, even the normal user permissions can effect root. Since devices are usually owned by root, and the mount points are owned by root there is normally no problems with mounting. But now your trying to mount to a normal users home directory, the permissions difference maybe causing mount to mount only as read-only. |
Actually everything is working since I added the bind type.
I had root add a subdirectory under "/fileserver" and then did a chown to the user on that subdirectory. So everything is golden now. Thanks for your help. |
Good to hear it's all sorted out
|
All times are GMT -5. The time now is 03:08 PM. |