-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Errno 13] Permission denied: #1108
Comments
I have this problem too . Don't know thy this happens |
We don't have enough logs to tell. We need full log and |
This happens because you are attempting to set permissions on files on mounted Windows drives from WSL, which is prohibited due to incompatibilities between Windows file permissions and Linux file permissions. The function that is failing, copytree(), attempts to apply permissions to copied files, hence the You can remedy this by building from a directory that is relative to the WSL root, e.g. |
please, how? |
I explained how. Please use more words to describe what you don't understand about the solution I suggested. |
I am building from ~/camera and getting: |
Thanks for the clarification. What do you see if you type |
Also, strange that it's getting the error when opening the file, not when actually copying it. You can add this log statement in |
Permission denied by Kivy at the very last stage of the build compile : shutil.Error: [('/mnt/d/kivy_projects/basics/.buildozer/applibs', '/mnt/d/kivy_projects/basics/.buildozer/android/app/_applibs', "[Errno 13] Permission denied: '/mnt/d/kivy_projects/basics/.buildozer/android/app/_applibs'")] Can anyone please help |
@SomyKamble I described the cause and a workaround for the problem in my first comment. |
@stefan-sherwood Hello. I am facing the same issue. But I have got this file in my project root folder. What should I do? |
As shown in your screenshot, it's trying to set permissions on a file whose root is |
In what way can I totally copy application root folder to WSL? And the same question for returning apk, that will have been built there. |
@stefan-sherwood I have started building, but at the very end got this error: Where can I check logs? |
Unfortunately the error is not shown. Try executing the exact command that comes after "Command failed: " and paste here what it says in response. |
The second one is a different error and it says exactly what the problem is 😮 |
Well, what the solution could be? |
If you Google the error message then the answer comes up as the first result. I am not going to debug your whole application, especially if you don't demonstrate diligence in figuring it out yourself. |
Permission problem probably from using root(sudo -s) while typing commands! |
Do sudo su. Install the buildozer later |
Nothing changed and I have this mistake ... What happened? With sudo -s is working... What caused this error? Ten minutes earlier everything worked without root (sudo -s) |
@hladkky
|
Based on first post where Python complains that it cannot access directory:
So your project is inside F:\helo\ at Windows side. Just grant full control access to folder F:\helo\ at Windows to your current Windows user. If your "WindowsUsername" is not listed in your directory properties, click Edit button and add it first. |
This is incorrect. As I explained above here you cannot grant a WSL full permissions to a non-WSL folder. |
You're wrong. Wanna proof of my Windows setup? I faced exactly same issue yesterday. PS. I just reproduced it twice. Windows user require full access control to be able to pass shuil.py copy under Linux (in my case Ubuntu 20.04 LTS) by buildoizer. It may be significant, that I'm using WSL version 1 (not version 2). Why I'm using WSL v1 ? Because v2 require additional virtualization Windows features which are not compatible with Nox Android Emulator for example. How to switch between WSL 1 and 2 ?
|
this buildozer line will fail if the libraries are being copied from Windows to WSL. This is identical behavior in WSL 1 and 2. What are the file paths being used in the |
Ok, short story long. In my case I placed project within: Then we have Ubuntu Linux (WSL) process, running under my Windows user. My user as I wrote before is part of Administrators group, but in Windows my user does not act as admin by default. It acts like regular user first, then if something require admin rights, then it's able to request additional rights, which usually require human confirmation (behaviour can be changed at UAC account setting). Ubuntu Linux is able to operate on Windows folders because they are mounted as But when Linux world want to do something, which Windows user running wsl process cannot do directly, It can't invoke Windows behaviour which asks human to agree to do such operation as administrator. Linux always operate on Windows mounted file system based on regular, direct user rights. That's why Buildozer launched under Linux is able to download and store over 1.3GB content within '/mnt/c/Kivy/Project/.buildozer/' without permission errors. At this phase regular users rights are enought. But copytree() require something more at Linux, and also Windows side. That's why it ends with copytree() under Linux invokes file permission operations (duplicating) at Windows side, which is allowed with It's similar to this: https://stackoverflow.com/questions/11835833/why-would-shutil-copy-raise-a-permission-exception-when-cp-doesnt |
If someone would ever wonder, you can open root WSL directory on your windows by typing "cd ~" in ubuntu and next typing "explorer.exe . " |
@Marcinosoft |
sudo chmod +x /root/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager |
Description
// REPLACE ME: What are you trying to get done, what has happened, what went wrong, and what did you expect?
buildozer.spec
buildozer android debug
`
Spec file:
Logs
Traceback (most recent call last):
File "/home/ren/.local/bin/buildozer", line 8, in
sys.exit(main())
File "/home/ren/.local/lib/python3.6/site-packages/buildozer/scripts/client.py", line 13, in main
Buildozer().run_command(sys.argv[1:])
File "/home/ren/.local/lib/python3.6/site-packages/buildozer/init.py", line 1071, in run_command
self.target.run_commands(args)
File "/home/ren/.local/lib/python3.6/site-packages/buildozer/target.py", line 92, in run_commands
func(args)
File "/home/ren/.local/lib/python3.6/site-packages/buildozer/target.py", line 104, in cmd_debug
self.buildozer.build()
File "/home/ren/.local/lib/python3.6/site-packages/buildozer/init.py", line 211, in build
self.build_application()
File "/home/ren/.local/lib/python3.6/site-packages/buildozer/init.py", line 739, in build_application
self._copy_application_libs()
File "/home/ren/.local/lib/python3.6/site-packages/buildozer/init.py", line 839, in _copy_application_libs
copytree(self.applibs_dir, join(self.app_dir, '_applibs'))
File "/usr/lib/python3.6/shutil.py", line 365, in copytree
raise Error(errors)
shutil.Error: [('/mnt/f/helo/.buildozer/applibs', '/mnt/f/helo/.buildozer/android/app/_applibs', "[Errno 13] Permission denied: '/mnt/f/helo/.buildozer/android/app/_applibs'")]
The text was updated successfully, but these errors were encountered: