This has been asked REPEATEDLY, so I know I’m going to get the standard “did you google it” reply… Well, I did! I googled the crap out of this one and I’m getting a LOT of hits that have nothing to do with my situation, and some that only partially match.
My company had an ancient windows 2012 (NOT r2) file server. it decided to die on saturday. I’ve been able to restore it’s filesystem to a dataset in truenas.
The restored data is located in /mnt/store-0/olddeadserver/ (which is the dataset)
Within that dataset there are 2 folders I wish to break out into their own datasets, but for permissions purposes, the contents need to be broken up into child datasets.
for this post, those folders are:
/mnt/store-0/olddeadserver/data/share1/(subfolders to be made into individual datasets)
this share1 folder has been created as it’s own dataset: /mnt/store-0/share1/(subfolder datasets)
I’m simply trying to copy files and folders from one dataset to the other thusly:
cp /mnt/store-0/olddeadserver/data/share1/subfolder1 /mnt/store-0/share1/ -var
and I get back the following error (repeated for every file and folder) cp: clearing permissions for '/mnt/store-0/olddeadserver/data/share1/subfolder1/anothersubfolder/adeeperfolder/file.name': operation not permitted.
This is annoying… but the files copy… except… when the error is on a folder, it stops copying files into said folder and moves on leaving an EMPTY FSCKING FOLDER!!!
I’m a little frustrated by this because I have to run the command over and over for every nested folder depth… the old file server was made more than 10 years ago… Its lousy with subfolders!
Rsync is useless, it not only wont copy contents of a folder it cant change the permissions for, it wont create the parent directory so it just wont go any farther.
I KNOW this is caused by using cp to move data arround where ACLs exit… so how the FRACK do I get around that? How am I supposed to move this data???