LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-05-2009, 11:35 PM   #1
kantu
Member
 
Registered: Sep 2008
Posts: 77

Rep: Reputation: 16
Unhappy Link Problems


I use CentOs 5.3 and in it NTFS is not auto mounted so i will mount when required in /media
Now i made a link to /media and placed it on my desktop using this
Code:
[kantu@localhost Desktop]$ ln -s -T /media/ Media
This worked fine and now i have a shortcut. But the problem is in /media directory ,this link is present in /media also and is infinite i think
Code:
[kantu@localhost media]$ ls
downloads        Friends 3..4,5  Media  music        vuze
Friend1 2 3(10)  games           misc   SRIKANTH_13  windowsxp
 

[kantu@localhost Media]$ pwd
/media/Media/Media/Media/Media/Media/Media/Media/Media/Media/Media/Media/Media/Media/Media/Media/Media
It goes on if i keep giving cd Media
What went wrong ?
All i wanted was a shortcut to /media directory so as to easily access all my windows drives


(And one more thing i noticed though i created the link as a normal user the file needs root permissions to delete )

Last edited by kantu; 08-07-2009 at 05:22 AM.
 
Old 08-06-2009, 03:01 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
You shouldn't mount it in the /media directory, you should do it in the /mnt directory. For example in the /mnt/ntfs.

Try to do it like I've said with;
Code:
ln -s -n /mnt/ntfs windows
/media directory - Mount points for removable media such a CD-ROMs

/mnt directory - Temporarily mounted filesystems

Note that ls denotes symbolic links with an arrow after the name, pointing to the name of the target file;
Code:
$ mkdir -p /tmp/one/two
$ echo "test_a" >/tmp/one/two/a
$ echo "test_b" >/tmp/one/two/b
$ cd /tmp/one/two
$ ls -l
-rw-r--r-- 1 user group 7 Jan 01 10:01 a
-rw-r--r-- 1 user group 7 Jan 01 10:01 b
$ cd /tmp
$ ln -s /tmp/one/two three
$ ls -l /tmp/three
lrwxrwxrwx 1 user group 12 Jul 22 10:02 /tmp/three -> /tmp/one/two
$ ls -l /tmp/three/
-rw-r--r-- 1 user group 7 Jan 01 10:01 a
-rw-r--r-- 1 user group 7 Jan 01 10:01 b
 
Old 08-06-2009, 04:47 AM   #3
kantu
Member
 
Registered: Sep 2008
Posts: 77

Original Poster
Rep: Reputation: 16
Thumbs up

That did it .Thanks a lot
I checked the link in /media
well only one link was there which said it was broken .
But why is it under root ?
 
Old 08-07-2009, 01:01 AM   #4
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
I don't use Rad Hat/CentOS, I never did and I'm not sure if I remember correctly but in Red Hat you have to have root privileges for almost everything.

Quick Google search gave me this.

Quote:
-o acl allows manipulating file ACLs. If a file system is mounted without the -o acl mount option, users are allowed to view ACLs (with getfacl), but are not allowed to set them (with setfacl).
That's why I like simple distros.

The link you've said, well of course it's broken because target doesn't exist anymore and as I said, I guess you have to be root to delete it.

[EDIT]

Well it looks like you've already find out what I was trying to say;

Quote:
Posted by kantu;

(And one more thing i noticed though i created the link as a normal user the file needs root permissions to delete )

Last edited by alan_ri; 08-07-2009 at 01:10 AM.
 
  


Reply


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
Problems with a link on a web page Post Modern Programming 2 09-07-2005 03:54 PM
problems removing a symoblic link SerfurJ Linux - Software 3 12-12-2003 02:01 PM
are there problems with D-Link and Linux? degraffenried13 Linux - Networking 4 12-02-2003 10:39 PM
link problems zhangxd6 Programming 6 09-07-2003 02:53 PM
D-Link problems Rutnut Linux - Networking 0 03-08-2002 01:53 AM


All times are GMT -5. The time now is 10:59 PM.

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