Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm following this tutorial to set up a LAMP stack on EC2 with persistent storage on EBS. It all works well when doing it step by step.

But in case you want to mount your EBS under /mnt instead of under the root directory the

ln -s

commands won't work!

I tried:

ln -s /mnt/ebs1/httpd /etc


ln -s /mnt/ebs1/httpd /etc/httpd

Is there a difference when linking to a file on a device that is mounted under /mnt?

(working on fedora core 8)

share|improve this question
How do you know it doesn't work? Is there an error message? – David Z Oct 31 '09 at 21:37
David, thanks for your query, no there is no error in the command line after submitting the links. but when i start back the httpd service i get an error saying that the .conf file is unreadable and the service fail to start. – Yaniv Oct 31 '09 at 21:50
What do you see when you do ls -l /mnt/ebs1/httpd /etc? – Dennis Williamson Oct 31 '09 at 22:01
Yaniv, what is the result of ls -ld /etc/httpd ? This may seem obvious, but the obvious has to be covered.... – casualcoder Nov 1 '09 at 0:51
Please don't try to symlink your entire /etc to a httpd config directory. It will kill your system. ln -s /mnt/ebs1/httpd /etc/httpd should work, unless there already is a /etc/httpd present. – pauska Dec 2 '09 at 13:22

ln -s /path/to/source /path/to/dest

should work on any normal filesystem.

What do you see with ls -lh /mnt/ebs1/httpd? Is the symlink created? If it is, check if apache is allowed to open the directory and read the config files. To do so, enter ls -l /mnt/ebs1/ and look for "x" and "r" bits in the permissions (beginning of line).

Update after comment:

The permissions are okay AFAIK. You should focus on apache then. Are there any errors in the logs? What does debug say?

share|improve this answer
Thanks PEra, output for ls -lh /mnt/ebs/httpd: # ls -lh /mnt/ebs1/httpd total 8.0K drwxr-xr-x 2 root root 4.0K 2009-10-31 19:27 conf drwxr-xr-x 2 root root 4.0K 2009-10-31 19:27 conf.d lrwxrwxrwx 1 root root 19 2009-10-31 19:32 logs -> ../../var/log/httpd lrwxrwxrwx 1 root root 27 2009-10-31 19:32 modules -> ../../usr/lib/httpd/modules lrwxrwxrwx 1 root root 13 2009-10-31 19:32 run -> ../../var/run and for ls -l /mnt/ebs1/ i get: # ls -l /mnt/ebs1/ total 20 drwxr-xr-x 4 root root 4096 2009-10-31 19:27 httpd drwx------ 2 root root 16384 2009-10-31 19:25 lost+found any suggestions? – Yaniv Oct 31 '09 at 23:41
sorry for that mess :) – Yaniv Oct 31 '09 at 23:42
well... i can't access the logs i see the file when i dir httpd but i cant see it's content with vi (says ne file).. – Yaniv Oct 31 '09 at 23:58

/mnt is usually for external drives like cdroms and usb sticks. USB sticks, phones, ipods etc. usually have crappy filesystems that don't support features like links.

share|improve this answer
i formated the device to ext3 using; mkfas ext3 /dev/sdh and mounted it with: mount -t ext3 /dev/sdh /mnt/ebs1 is that change anything? – Yaniv Nov 1 '09 at 0:32
The /media directory is used for removable media such as iPods, USB sticks, etc. The /mnt directory is for system administrator use. See the FHS specifications (part of the LSB spec): Furthermore, while most removable devices do use FAT, which is not suitable for links, the end result of the OP's link is in /etc, for which links must work on most Unix systems. – casualcoder Nov 1 '09 at 0:42
/mnt used to be a dir for mountpoints a couple of years ago... I guess that old habits die slowly. – Johan Nov 1 '09 at 8:03
Oh, right, never mind then :D – Lee B Nov 1 '09 at 12:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.