[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
`cp -p` incorrectly sets g+s bit when fs supports acl
From: |
Mike Frysinger |
Subject: |
`cp -p` incorrectly sets g+s bit when fs supports acl |
Date: |
Fri, 22 Feb 2008 22:39:57 -0500 |
User-agent: |
KMail/1.9.7 |
i'm using coreutils-6.10 with acl-2.2.47 on linux-2.6.24. when using ext2
with acl support enabled, `cp -p` on a directory who does not have the g+s
bit set but whose parent does have g+s set, the new destination directory
will have the g+s bit set. if the filesystem is remounted with acl support
turned off, the g+s bit is (correctly) not set on the new destination
directory.
consider:
dd if=/dev/zero of=fs.img count=512
mke2fs fs.img
mkdir fs
mount -o loop,acl fs.img fs
cd fs
mkdir parent
chmod g+s parent
cd parent
mkdir src
chmod g-s src
cp -pr src dst
now, if i do `ls -l` on the dirs with acl support:
drwxr-sr-x 2 root root 1024 2008-02-22 22:22 dst
drwxr-xr-x 2 root root 1024 2008-02-22 22:22 src
and if i remount w/out acl and repeat the steps:
drwxr-xr-x 2 root root 1024 2008-02-22 22:22 dst
drwxr-xr-x 2 root root 1024 2008-02-22 22:22 src
-mike
signature.asc
Description: This is a digitally signed message part.
- `cp -p` incorrectly sets g+s bit when fs supports acl,
Mike Frysinger <=