iainc
Cadet
- Joined
- Aug 7, 2014
- Messages
- 5
I am trying to copy a lot of existing files from one volume/dataset to another. I ran out of space and created a new, larger zpool. I'm using cp -a and it complains "Operation not permitted". It seems that the destination file is created with an ACL, even though the source file has none. Note the + in the final ls output:
I believe that both source volume/dataset and destination have the same permissions: http://doc.freenas.org/9.3/freenas_storage.html#change-permissions. And both datasets have permission type "Windows/Mac ACL". Why should creating a file create an ACL in one and not the other?
What's more, it looks like cp does not copy ACLs correctly. I would expect that cp -a would duplicate my file and duplicate the ACL, if present. I can easily set the desired non-ACL permissions manually on the destination file:
Why can't cp -a do that? Doing it manually is no use for the 44,000 files that I need to copy with attributes intact.
I've had a look at various forums posts such as:
https://forums.freenas.org/index.php?threads/cant-chmod-files-operation-not-permitted.22229/
Nothing I've found seems to describe my own simple problem. But permissions are confusing, even before ACLs.
(I'm on FreeBSD 9.2-RELEASE-p9 (FREENAS.amd64) #0 r262572+cc525fe: Thu Jul 3 14:22:45 PDT 2014. I've tried to upgrade to the latest 9.3 to see if it's any different. But the 9.3 installer renders my USB drive unbootable every time. I think my mobo is too old and an X10SL7-F is on order.)
Code:
[root@freenas] /mnt/pool1/dataset1/backup# touch foo [root@freenas] /mnt/pool1/dataset1/backup# ls -l foo -rw-r--r-- 1 root home 0 Jan 28 14:35 foo [root@freenas] /mnt/pool1/dataset1/backup# cp -a foo /mnt/pool2/dataset2/ cp: chmod: /mnt/pool2/dataset2/foo: Operation not permitted [root@freenas] /mnt/pool1/dataset1/backup# cd /mnt/pool2/dataset2/ [root@freenas] /mnt/pool2/dataset2# ls -l foo -rwxrwxr-x+ 1 root home 0 Jan 28 14:35 foo*
I believe that both source volume/dataset and destination have the same permissions: http://doc.freenas.org/9.3/freenas_storage.html#change-permissions. And both datasets have permission type "Windows/Mac ACL". Why should creating a file create an ACL in one and not the other?
What's more, it looks like cp does not copy ACLs correctly. I would expect that cp -a would duplicate my file and duplicate the ACL, if present. I can easily set the desired non-ACL permissions manually on the destination file:
Code:
[root@freenas] /mnt/pool2/dataset2# setfacl -b foo [root@freenas] /mnt/pool2/dataset2# chmod 644 foo [root@freenas] /mnt/pool2/dataset2# ls -l foo -rw-r--r-- 1 root home 0 Jan 28 14:35 foo
Why can't cp -a do that? Doing it manually is no use for the 44,000 files that I need to copy with attributes intact.
I've had a look at various forums posts such as:
https://forums.freenas.org/index.php?threads/cant-chmod-files-operation-not-permitted.22229/
Nothing I've found seems to describe my own simple problem. But permissions are confusing, even before ACLs.
(I'm on FreeBSD 9.2-RELEASE-p9 (FREENAS.amd64) #0 r262572+cc525fe: Thu Jul 3 14:22:45 PDT 2014. I've tried to upgrade to the latest 9.3 to see if it's any different. But the 9.3 installer renders my USB drive unbootable every time. I think my mobo is too old and an X10SL7-F is on order.)