View Single Post
  #7  
Old 06-10-2009, 03:21 AM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

Just FYI about dereferencing symlinks:

Code:
john@paranoia:~$ ls -l eqemu
lrwxrwxrwx 1 john john 19 2009-05-04 13:15 eqemu -> ../etch/home/eqemu/
john@paranoia:~$ ls -lL | grep eqemu
drwxr-xr-x 13 john john       4096 2009-05-11 06:51 eqemu
john@paranoia:~$ ls -lL eqemu
total 84
-rwxr-xr-x   1 root root   287 2008-12-20 06:03 checkoutPeq.sh
drwxr-xr-x   4 root root  4096 2009-04-09 13:16 database
-rw-r--r--   1 john john  2558 2009-05-11 06:51 eqbuild.tgz
drwxr-xr-x   2 root root  4096 2008-12-20 06:03 files
-rwxr-xr-x   1 root root    94 2008-12-20 06:03 getEmuSource.sh
-rwxr-xr-x   1 root root    82 2008-12-20 06:03 getEmuSource.sh~
drwxr-xr-x   2 john john  4096 2009-04-10 08:23 LS
drwxr-xr-x   2 root root 24576 2009-01-19 07:20 maps
drwxr-xr-x   8 john john  4096 2009-05-11 13:42 new
drwxr-xr-x  11 root root  4096 2009-04-08 09:54 oldsource
drwxr-xr-x  11 root root  4096 2009-01-14 08:55 oldsource.1
drwxr-xr-x   4 root root  4096 2009-04-08 10:53 projecteqemu-read-only
drwxr-xr-x 194 root root  4096 2009-04-08 11:36 quests
drwxr-xr-x   2 root root  4096 2009-05-11 09:52 server
drwxr-xr-x  11 root root  4096 2009-04-09 07:39 source
drwxr-xr-x   3 root root  4096 2009-04-08 12:31 working_source
john@paranoia:~$
The first ls gives the permissions in the current directory.
The last ls gives the permissions in the target of the symlink
The middle ls with a grep gives the permissions of the target of the symlink

There is another option for ls that does the middle one without a grep, but my mind is too small to keep track of all the possible options for gnu ls.

Oh, and the reason because it looks like everything in the target belongs to root is because my eqemu runs in a chroot with a really wierd etc/passwd. This protects the server from my 170+ IQ 13 year old hacker son. He keeps me on my toes!

Last edited by Kobaz; 06-10-2009 at 11:26 AM.. Reason: clarification
Reply With Quote