Date: Thu, 22 Sep 2011 16:54:22 +0200 From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= <olivier@cochard.me> To: freebsd-stable@freebsd.org Subject: cpio and directory owner preservation behaviour Message-ID: <CA%2Bq%2BTcpCH5jU61q7cTR=nmQ06zRbCJNUvRPkbRCBk-VN6h02Lg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi all, I meet a problem with cpio and I would to know if it's a normal behaviour or a bug. I would to save some files and create directories if needed with owner and permission kept. here is an example with net/quagga: I would to save /usr/local/etc/quagga/ripd.conf and creating needed directory in /tmp [root@R3]/#ls -alh /usr/local/etc | grep quagga drwxr-xr-x 2 quagga quagga 512B Sep 22 15:28 quagga [root@R3]/#ls -alh /usr/local/etc/quagga/ripd.conf -rw------- 1 quagga quagga 134B Sep 22 15:28 quagga/ripd.conf [root@R3]/#(cd /usr/local/etc; find . -name ripd.conf -type f | cpio -dumpv /tmp/) The file owner and permission for ripd.conf is keept: [root@R3]/#ls -alh /tmp/quagga/ripd.conf -rw------- 1 quagga quagga 134B Sep 22 15:28 /tmp/quagga/ripd.conf But not the directory owner that is changed to root:wheel [root@R3]/#ls -alh /tmp | grep quagga drwxr-xr-x 2 root wheel 512B Sep 22 16:41 quagga Is a cpio bug ? Thanks, Olivier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2Bq%2BTcpCH5jU61q7cTR=nmQ06zRbCJNUvRPkbRCBk-VN6h02Lg>