Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
I would like to mount /dev/cdrom to multiple locations for accessibility reasons. I would like it to be available from ftp doc root and http doc root.
So I need it at these 2 locations:
/var/ftp/pub/installfiles
/var/www/html/installfiles
now I am aware of "mount --bind", but if I put it in the rc.local it does not work for some reason and I have to manually mount on every reboot.
I am also aware of the symlink option, however vsftpd does not follow symlinks and someone told me its a big security issue, but I am open to it if this is recommended.
well who knew.. apparently this worked.. just mounted the cdrom to multiple locs in /etc/fstab
Now I dont know if this is the right method or could cause any other problems
Symlinks are not a good idea. FTP very often denies symlinks by default due to security risk. The attack can be done by making a fake link such as 'ln -s /etc/passwd myfile'. When anybody can make link so he/she can read many other files. Except you strongly secure your system by SELinux very well.
Try to write your regular SysV init script such as a service (it just need to implement start/stop/status) and make links into required rcX.d direcotries (levels).
I've really no idea why your rc.local doesn't work. I guess when you run your /etc/rc.d/rc.local, it works fine.
It could be that you're just not allowing enough time for the first mount to complete before executing the bind mount. Try telling the script to sleep for a couple of seconds before moving on.
Hi David,
The first mount is via /etc/fstab, and the bind mount is via rc.local.
So I should just put something like "sleep 5" before the "mount --bind ..." in rc.local?
Possibly. I'm just throwing out a guess. I'm not much of an expert on what happens during system starts. Do you get any errors in your system logs?
I'd also try configuring the script so that it spits some feedback about what it's doing into a file somewhere. Redirect the stderr of the mount command there, at least.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.