From: Joe Peterson <lavajoe@gentoo.org>
To: linux-btrfs@vger.kernel.org
Subject: 'cp -p' leaves mode on destination files/dirs incorrect
Date: Mon, 02 Jun 2008 17:42:50 -0600 [thread overview]
Message-ID: <4844857A.4010708@gentoo.org> (raw)
In-Reply-To: <200805291148.46203.chris.mason@oracle.com>
Hi all, this is a problem observed in btrfs-0.15:
Using 'cp -p', 'cp -a', or moving files to btrfs from another filesystem
(which does a copy then remove) will leave the copied files with the
wrong mode. Specifically, all permissions for 'group' or 'other' are
nulled out. My umask is the typical 0022, but umask should not matter
here anyway (to make sure I wasn't crazy, I tried it on an ext3 partition).
The simplest example is:
touch bar
cp -p bar foo
Doing 'ls -l bar foo' yields:
-rw-r--r-- 1 joe skyrush 0 Jun 2 17:38 bar
-rw------- 1 joe skyrush 0 Jun 2 17:38 foo
For directories, if they used to have mode 755, the copies will then
have mode 700.
I first noticed this when moving dirs from another partition, but
'cp -a', of course, demonstrated it as well.
I do not know the btrfs code well yet, but I am willing to help
investigate this, especially of someone points me to the right place to
start looking. :)
-Thanks, Joe
next prev parent reply other threads:[~2008-06-02 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 15:48 Btrfs v0.15 released Chris Mason
2008-06-02 23:42 ` Joe Peterson [this message]
2008-06-03 10:20 ` 'cp -p' leaves mode on destination files/dirs incorrect Yan Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4844857A.4010708@gentoo.org \
--to=lavajoe@gentoo.org \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.