From c385cf792ecefa9181b9febec027f101fee112e1 Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 5 Apr 2007 15:31:28 +0000 Subject: common.sh: permission, owner and group reading fix on directories git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@241 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'trunk/lib') diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 6d23262..7d9444b 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -391,7 +391,7 @@ function numeric_perm { # just a bit of forbidden secrets if [ -a "$1" ]; then - ls -ln $1| awk '{ print $1 }' | \ + ls -lnd $1 | awk '{ print $1 }' | \ sed -e 's/^.//' -e 's/r/4/g' -e 's/w/2/g' -e 's/x/1/g' \ -e 's/-/0/g' -e 's/\(.\)\(.\)\(.\)/\1+\2+\3/g' | \ fold -w5 | bc -l | xargs | sed -e 's/ //g' @@ -405,7 +405,7 @@ function get_owner { # usage: get_owner if [ -a "$1" ]; then - ls -ln $1 | awk '{ print $3 }' + ls -lnd $1 | awk '{ print $3 }' fi } @@ -416,7 +416,7 @@ function get_group { # usage: get_group if [ -a "$1" ]; then - ls -ln $1 | awk '{ print $4 }' + ls -lnd $1 | awk '{ print $4 }' fi } -- cgit v1.2.3