Skip to contentSkip to conversation

New: Permission denied while running "make"

Buildroot bugzilla at busybox.net 1 participant 11 messages Sep 19, 2019 – Sep 25, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=12241

Bug ID: 12241
Summary: Permission denied while running "make"
Product: buildroot
Version: 2019.08
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at buildroot.uclibc.org
Reporter: ceremcem at ceremcem.net
CC: buildroot at uclibc.org
Target Milestone: ---

I'm getting the following error when I run "make":

INSTALL include/linux/iio (2 files)
INSTALL include/linux/isdn (1 file)
INSTALL include/linux/mmc (1 file)
INSTALL include/linux/netfilter (88 files)
INSTALL include/linux/netfilter_arp (2 files)
INSTALL include/linux/netfilter_bridge (17 files)
INSTALL include/linux/netfilter_ipv4 (9 files)
INSTALL include/linux/netfilter/ipset (4 files)
INSTALL include/linux/netfilter_ipv6 (13 files)
INSTALL include/linux/nfsd (5 files)
INSTALL include/linux/raid (2 files)
INSTALL include/linux/sched (1 file)
INSTALL include/linux/spi (1 file)
INSTALL include/linux/sunrpc (1 file)
INSTALL include/linux/tc_act (15 files)
INSTALL include/linux/tc_ematch (5 files)
INSTALL include/linux/usb (13 files)
INSTALL include/linux/wimax (1 file)
INSTALL include/asm (38 files)
make[1]: Leaving directory '/home/ceremcem/sync/curr-projects/scada-gateway/os/disk-images/rpi-buildroot/output/build/linux-headers-4.19.38' if ! support/scripts/check-kernel-headers.sh /home/ceremcem/sync/curr-projects/scada-gateway/os/disk-images/rpi-buildroot/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot
4.19; then exit 1; fi
support/scripts/check-kernel-headers.sh: 38:
support/scripts/check-kernel-headers.sh: /tmp/check-headers.rQZuHv: Permission
denied
make: *** [package/pkg-generic.mk:283:
/home/ceremcem/sync/curr-projects/scada-gateway/os/disk-images/rpi-buildroot/output/build/linux-headers-4.19.38/.stamp_staging_installed] Error 1

-----------------

I'm using a git clone: cd8ab1853d (HEAD -> latest-release, tag: 2019.08-rc3) Update for 2019.08-rc3

Host is: Linux cca-erik 4.19.0-1-amd64 #1 SMP Debian 4.19.12-1 (2018-12-22) x86_64 GNU/Linux

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

--- Comment #1 from Thomas Petazzoni <[email protected]> --- I'm afraid this does not look like a Buildroot issue, but a system configuration issue on your machine: /tmp is not writable by the user with which you're doing the Buildroot build. Could you try to just run "touch /tmp/foobar" ? I guess you'll get the same Permission denied issue. If it's the case, then you have to fix your system /tmp permissions.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

--- Comment #2 from Cerem Cem ASLAN <[email protected]> --- "touch /tmp/foobar" works correctly:

ceremcem at cca-erik:~$ touch /tmp/foobar ceremcem at cca-erik:~$ ls -l /tmp/foobar -rw-r--r-- 1 ceremcem ceremcem 0 Sep 20 03:04 /tmp/foobar

FYI: I've been using this installation for more than 2 years without any issue.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#4 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

--- Comment #3 from Carlos Santos <[email protected]> --- (In reply to Cerem Cem ASLAN from comment #2)

Is your /tmp mounted with "noexec" option? What's the output of the command

mount | grep -F /tmp

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#5 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

Cerem Cem ASLAN <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #4 from Cerem Cem ASLAN <[email protected]> --- Exactly:

ceremcem at cca-erik:~$ mount | grep -F /tmp
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,noatime,size=524288k)

I remounted with "exec":

sudo mount -o remount,exec /tmp

Then compilation continued. Would you consider adding that checking into makefile? (I may provide a patch for that)

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#6 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

--- Comment #5 from Thomas Petazzoni <[email protected]> --- (In reply to Carlos Santos from comment #3)
Good finding Carlos! Is mounting /tmp with noexec a common thing? From a quick Google search seems like a number of people are recommending to do this. Not sure if this is good advice.

But, for this specific case, Buildroot generally puts all its generated contents in $(O), even temporary things. Perhaps we should do the same for this check-headers script?

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#7 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

Carlos Santos <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|RESOLVED                    |REOPENED
           Assignee|unassigned at buildroot.uclibc |unixmania at gmail.com
                   |.org                        |
         Resolution|FIXED                       |---

--- Comment #6 from Carlos Santos <[email protected]> --- (In reply to Thomas Petazzoni from comment #5)

Some people recommend mounting /tmp with nodev, noexec and nosuid options for security reasons. It is pretty common on FreeBSD but it's not default on Linux distros.

I will send a patch for check-kernel-headers.sh to fix this.

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#9 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

Carlos Santos <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unixmania at gmail.com |unassigned at buildroot.uclibc
| |.org

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.
#10 lore raw

[Buildroot] [Bug 12241] Permission denied while running "make"

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=12241

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Thomas Petazzoni <[email protected]> --- Fixed by
https://git.buildroot.org/buildroot/commit/?id=6136765b23abd9faba610dd54ed276a777811575.
Thanks Carlos for the investigation and fix!

Signature · 2 lines
You are receiving this mail because:
You are on the CC list for the bug.