Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-27-2005, 07:22 PM   #1
LQ Newbie
Registered: Dec 2005
Location: Here.
Distribution: Ubuntu 7.04 Server
Posts: 13

Rep: Reputation: 0
ln fails over different mounts


I'm setting up my website and I wanted to make a link in the site's new root to the sites old root. I figured that the command to do this would be:

Old root> /var/www/
New root> /root/htdocs

ln /var/www/ /root/htdocs

But this fails, stating "Invalid cross-device link". Could this be that /var/* is mounted on /dev/hda51 and /root/htdocs/* is mounted on /dev/hda52?

EDIT> Nevermind about the site's root and making the link, I fixed that up. But I'd like to know, can I not make a hard link because I'm linking to something on a different mount?

Last edited by Phaux; 12-27-2005 at 07:57 PM.
Old 12-27-2005, 07:59 PM   #2
Registered: Nov 2003
Location: ~
Distribution: Ubuntu 10.04
Posts: 843
Blog Entries: 1

Rep: Reputation: 30

ln[-s] (existing file/folder) (link to existing file)

your command is:

ln -s /var/www/ /root/htdocs

I think the problem is that you weren't making a symlink, symlink are more flexible.


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
cd mounts Murph00009 Linux - Hardware 1 01-07-2005 11:57 PM
DHCP fails, IP fails, packet framing errors? alonsomosely Fedora 2 09-17-2004 12:22 PM
Encrypted Reiserfs Fails to Mount -- Reiserfsck Fails as Well antic Linux - Hardware 0 07-30-2004 05:32 PM
Cd mounts auto ch4s3r Linux - Software 1 02-26-2004 07:35 PM
some help with x and mounts sehris Slackware 4 08-12-2003 03:45 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:15 AM.

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