aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-05 15:31:28 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2007-04-05 15:31:28 +0000
commitc385cf792ecefa9181b9febec027f101fee112e1 (patch)
treefdd99f9420d145b341c2c94fb8bf390dc63ba656 /trunk/lib
parent26eb4c44d95a494cff0a8fbceabb157362288803 (diff)
downloadsimplepkg-c385cf792ecefa9181b9febec027f101fee112e1.tar.gz
simplepkg-c385cf792ecefa9181b9febec027f101fee112e1.tar.bz2
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
Diffstat (limited to 'trunk/lib')
-rw-r--r--trunk/lib/common.sh6
1 files changed, 3 insertions, 3 deletions
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 <file>
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 <file>
if [ -a "$1" ]; then
- ls -ln $1 | awk '{ print $4 }'
+ ls -lnd $1 | awk '{ print $4 }'
fi
}