[Errno 13] Permission denied: when compiling copter [closed]

Hi there,
I am working on setting up a new flight mode for my quad to perform a specific function. I have followed the instructions to do so here: http://ardupilot.org/dev/docs/apmcopter-adding-a-new-flight-mode.html
Im using windows 10, running ubuntu 18.04 lts terminal, building with waf.
I configure the board using ./waf configure --board Pixhawk4 (since im using pixhawk4)
and proceed to compile the build ./waf copter

This is the error I am currently getting:

Build failed
Traceback (most recent call last):
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/Runner.py”, line 395, in task_status
return tsk.runnable_status()
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/extras/clang_compilation_database.py”, line 76, in runnable_status
run_status = self.old_runnable_status()
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/Task.py”, line 669, in runnable_status
new_sig = self.signature()
File “Tools/ardupilotwaf/ap_persistent.py”, line 32, in _signature
s = _original_signature(self)
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/Task.py”, line 633, in signature
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/Task.py”, line 729, in sig_explicit_deps
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/Node.py”, line 964, in get_bld_sig
ret = cache[self] = self.h_file()
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/Node.py”, line 944, in h_file
return Utils.h_file(self.abspath())
File “/home/kambyan-rnd/ardupilot/modules/waf/waflib/Utils.py”, line 278, in h_file
with open(fname, ‘rb’) as f:
IOError: [Errno 13] Permission denied: ‘/home/kambyan-rnd/ardupilot/ArduCopter/Parameters.cpp’

Appreciate any help on this. Thanks.

  • Daniel

Well, that’s weird. What are the permission on that file - and owner?

ls -l /home/kambyan-rnd/ardupilot/ArduCopter/Parameters.cpp

Also, what does “git status” say?


Hi Peter,
Thanks for the response.

git status :
On branch master
Your branch is up-to-date with ‘origin/master’.
Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

    modified:   ArduCopter/Copter.h
    modified:   ArduCopter/Parameters.cpp
    modified:   ArduCopter/mode.cpp
    modified:   ArduCopter/mode.h

Untracked files:
(use “git add …” to include in what will be committed)


no changes added to commit (use “git add” and/or “git commit -a”)

So correct me if I’m wrong, I would need to commit my mods & new flight mode to the origin/master in order to get them active?
Is there a way to do this locally without committing them?
Would I need to fork the repo and work from there?
Apologies for the tutor session, still new to all this, learning it as I go.



I think I found what I was looking for.


mode_moon sounds fun!?