mackup
mackup copied to clipboard
Permission denied
Any idea why this might be happening to me?
Mackup does not seem to be able to move .shsh/.cache/lib-osx.jar
Frankly, I think the app config is bad, as Mackup should not try to sync cache files, and .shsh/.cache
is an obvious name.
@stechico you added support for this https://github.com/lra/mackup/blob/master/mackup/applications/shsh-blobs.cfg, any idea?
I'm getting the exact same error just it occurs when I try to backup my oh-my-zsh config file. Is there any way to modify the oh-my-zsh app config to ignore the .git directory?
No: https://github.com/lra/mackup/issues/602
I'm getting the exact same error and Traceback as @boetter
I just upgraded through Homebrew and seems the bug is still the same.

@boetter I encountered this same error just now. The issue seemed to be that I didn't have Dropbox open and actively connected. Whilst my files has sync'd to my Dropbox folder, it needed an active connection to work.
Same with me. just installed and got this error:
OSError: [Errno 13] Permission denied: '/Users/petrkorolev/.shsh/.cache/lib-osx.jar'
2 years later and still have this issue.
I'm having the exact same problem on Ubuntu 18.04
Restoring .oh-my-zsh/custom ...
You already have a folder named .oh-my-zsh/custom in your home.
Do you want to replace it with your backup ? <Yes|No>yes
Traceback (most recent call last):
File "/home/dizzi/.conda/envs/mcup/bin/mackup", line 8, in <module>
sys.exit(main())
File "/home/dizzi/.conda/envs/mcup/lib/python3.7/site-packages/mackup/main.py", line 120, in main
app.restore()
File "/home/dizzi/.conda/envs/mcup/lib/python3.7/site-packages/mackup/application.py", line 201, in restore
utils.delete(home_filepath)
File "/home/dizzi/.conda/envs/mcup/lib/python3.7/site-packages/mackup/utils.py", line 68, in delete
shutil.rmtree(filepath)
File "/home/dizzi/.conda/envs/mcup/lib/python3.7/shutil.py", line 498, in rmtree
onerror(os.rmdir, path, sys.exc_info())
File "/home/dizzi/.conda/envs/mcup/lib/python3.7/shutil.py", line 496, in rmtree
os.rmdir(path)
PermissionError: [Errno 13] Permission denied: '/home/dizzi/.oh-my-zsh/custom'
ok, unless someone has a fix, the only thing I can do is remove support for oh-my-zsh and shsh.
I've got a similar message for a different app:
PermissionError: [Errno 13] Permission denied: '/Users/asapinto/.config/filezilla'
And I'm getting this issue for DefaultKeyBinding.dict
:
$ mackup backup
Mackup needs a directory to store your configuration files
Do you want to create it now? </Users/username/Library/Mobile Documents/com~apple~CloudDocs/Mackup> <Yes|No>Yes
Backing up .ansible ...
Backing up Library/Preferences/com.apple.Music.eq.plist ...
Backing up Library/Preferences/com.apple.Music.plist ...
Backing up .asdfrc ...
Backing up .bashrc ...
Backing up .bash_profile ...
Backing up .profile ...
Backing up .bundle/config ...
Backing up Library/KeyBindings/DefaultKeyBinding.dict ...
Traceback (most recent call last):
File "/usr/local/bin/mackup", line 33, in <module>
sys.exit(load_entry_point('mackup==0.8.32', 'console_scripts', 'mackup')())
File "/usr/local/Cellar/mackup/0.8.32/libexec/lib/python3.9/site-packages/mackup/main.py", line 93, in main
app.backup()
File "/usr/local/Cellar/mackup/0.8.32/libexec/lib/python3.9/site-packages/mackup/application.py", line 119, in backup
utils.delete(home_filepath)
File "/usr/local/Cellar/mackup/0.8.32/libexec/lib/python3.9/site-packages/mackup/utils.py", line 66, in delete
os.remove(filepath)
PermissionError: [Errno 13] Permission denied: '/Users/username/Library/KeyBindings/DefaultKeyBinding.dict'
This file is readable
-rw-r--r-- 1 root staff 606B Jan 11 2021 /Users/username/Library/KeyBindings/DefaultKeyBinding.dict
But mackup obviously tries to delete it and this is obviously not possible without sudo
access.
So if mackup sees insufficient rights, it could propose
- becoming sudo
- changing permissions
- changing the owner
- skipping this particular backup and echo a warning
I fixed it by executing
$ sudo chown $USER "$HOME/Library/KeyBindings/"
$ sudo chown $USER "$HOME/Library/KeyBindings/DefaultKeyBinding.dict"
Personally I think that mackup could propose something like this in it's error message (a ready copy n paste friendly command). This way a user could still decide what to do.