vote up 3 vote down star

Hi,

I'm trying to create a symlink with a network shared folder (located in a windows sys) from my ubuntu system using the command.

ln -s smb://sys-name/www www

It creates a link but it says the link is broken. But the path exists and I can browse to the network folder path.

Could anybody point me the issue?

Basically, I'm trying to create the link as I'm not able to access the network shared files from eclipse, so thought of making use of the symlinks, but didn't work out. Any other workaround for this ?

Thanks in advance, - Pavan Kumar

flag

migrated from stackoverflow.com

5 Answers

vote up 3 vote down

You can't make a link to something which isn't in your filesystem. That you can browse it is a feature of your file browser; that's why it doesn't work with eclipse or ln.

What you want to do is mount the remote filesystem into your filesystem. For example mount -t cifs //sys-name/www www. See man mount.cifs for more details.

link|flag
vote up 0 vote down

Why not mount the folder instead of symlinking

link|flag
vote up 0 vote down

Thanks, now i can mount the network folder.

but everytime, i need to run the command mannually, when i start the system.

can this command be run automatically in the startup?

Can u help me out with this problem.

link|flag
Please, do not add the kind of details as an answer (this is not an answer) but edit your initial question instead (and delete this answer). Thanks in advance. – Pascal Thivent Oct 31 at 23:22
vote up 0 vote down

As others pointed out, mount the folder instead. I'd suggest to create a mount point under /mnt, like /mnt/www (historically, /mnt is used for the non-removable mount points, /media is recommended for removable media only). Then, mount the network share, e.g.:

mount -t cifs //server/share /mnt/www --verbose -o user=username

If you don't want to type this every time you login, you could add an entry to /etc/fstab. Check this thread, it explains how to do this (and if you want to learn more about /etc/fstab, see How to edit and understand /etc/fstab).

link|flag
vote up 0 vote down

You need to add the mounted place to /etc/fstab

link|flag

Your Answer

Get an OpenID
or
never shown

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