10

OneDrive has a feature called "Files On-Demand", I'm playing arround with it and trying to figure out how it works. It looks like OneDrive uses sparse files as placeholders before the really file is downloaded to local. I found that I can't move those sparse files out of the OneDrive folder when OneDrive is not running. The system asked me to enter password to allow this operation then it failed with message "The operation can’t be completed because you don’t have permission to access some of the items.". enter image description here

I've changed file permissions to rwxrwxrwx and ACL permissions to Read & Write but still doesn't work.

enter image description here

I like to understand what is going underneath. Why those files can not being moved when OneDrive is not running. I appreciate your help!

3
  • have you found a solution yet? I've just discovered after recently leaving my old job that I can't delete any directories from my OneDrive Business account on a personal machine. I found this solution over on the Apple forums but honestly don't have the time and energy to attempt it: discussions.apple.com/thread/250913183 Commented Dec 6, 2019 at 14:28
  • @electricbrickco I doubt that OneDrive files come under SIP protection. OP: Also note that the files' opening app is OneDrive launcher.app. I don't know what to make of it.
    – anki
    Commented Dec 6, 2019 at 15:43
  • @electricbrickco I haven't figure out how it works. If I remember correctly I tried the method in the link before and at that time it doesn't work.
    – Jian
    Commented Dec 6, 2019 at 15:47

8 Answers 8

5

I had the same problem. What worked for me was to open the source file, which probably triggered the on-demand download. Then I was able to move/copy it elsewhere.

You could probably also go to OneDrive Preferences and click "Turn Off Files On-Demand"

1
  • "Turning Off Files On-Demand" worked for me. Thanks!
    – Mikolaj
    Commented Jan 11, 2020 at 12:01
3

I had a similar issue with files in a portable drive I swapped between Windows and MacOS. For some unexplained reason some files had the user immutable flag set, thus, would not be deleted even using sudo rm.

For me, what worked was to run the following command in the terminal:

sudo chflags -R nouchg '/Volumes/DriveName/DirectoryPath'

I am no expert, but put simply: this clears the "user immutable flag" on all files under the DirectoryPath. The man page should give you more details.

I discovered this in an apple forum, so credit goes to the user who posted it. Hope this helps!

1

I had the same issue and had luck with the following:

Instead of dragging the folder, try to simply right click and copy from one location and then paste into the new location (one drive).

Hope this works for you as it has for me.

1
  • 1
    nah.. just tried. I can't copy-paste from OneDrive to Disk, neither from OneDrive to OneDrive.
    – anki
    Commented Dec 6, 2019 at 16:22
1

So I had the same problem and it seems to me that the issue is that the OneDrive app is not open. What I did is opened the OneDrive app so it's syncing in the background and one way to confirm it's open is that you can then see it in top taskbar (attached pic), and then it all worked just fine.

Hope this helps!

enter image description here

1
  • I don't know why you got downvoted but this is the only correct, simply answer.
    – Sherif
    Commented Feb 16, 2022 at 16:57
1

Try double-clicking this:

/Applications/OneDrive.app/Contents/Resources/ResetOneDriveAppStandalone.command

You'll need to log in again, and make sure you point to the same folder as before.

1
  • This worked for me.
    – pceccon
    Commented Feb 16, 2021 at 17:59
1

The permissions this error is referencing are not the POSIX permissions (rwx), but the ACL permissions associated with the file.

ACLs are denoted with a "+" at the end of the standard POSIX permissions in a ls -la command.

You can remove all ACL permissions for a file with the following:

sudo chmod -N $path_to_file

Or all files in a folder with:

sudo chmod -RN $path_to_folder

To read a File's ACLs:

ls -lae $path_to_file

Additional Information about POSIX and File Extension Attributes at this answer

1
  • Still getting the same error message... Commented Jan 1, 2021 at 16:15
0

I had the same problem and then found out that I had put the OneDrive sync app on pause. After starting the sync process again the problem was gone.

0

I tried most of the things suggested here, and nothing was still working, I was getting the error "The operation can’t be completed because you don’t have permission to access some of the items."

In my case, it was a single symbolic link that was causing the copy to fail, ls -al and removed, I could copy the files across.

The problem is that there were other links in the files to be copied, and those had no issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .