This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 7.3 RC2 (Build 201302050851) Operating System = Linux version 2.6.32-279.el6.x86_64 running on amd64 Java; VM; Vendor = 1.7.0_13 Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01 Project builds fine with 7.3b2, but using 7.3RC2 I get: ------------ Cannot run program "/tmp/dlight_gregj/33e48052/01004131055/pty": error=13, Permission denied BUILD FAILED (exit value -2, total time: 54ms) ------------- Both versions of Netbeans installed to /opt/netbeans, which is chowned to my user. /tmp is mounted rw,noexec,nosuid,noatime and is tmpfs
Created attachment 131180 [details] IDE log
Debug also fails with similar symptoms. Since the errors seem to indicate inability to execute something from /tmp, I tried remounting /tmp without -noexec, and can verify that build and debug then work. Again, 7.3 Beta 2 did not have this issue. Since it's typical to mount /tmp -noexec for security reasons, I don't think the current RC2 behavior is appropriate.
It it unlikely that this worked in Beta 2. When this (noexec) issue was reported for the first time, a special flag "cnd.tmpbase" was introduced to make it possible to re-define a base of temp files. So one can start nb with -J-Dcnd.tmpbase=/var/tmp/nbtmp to change the default location. This situation should be handled in a better way, for sure... But this is not a showstopper as well as not a P2 issue.
Created attachment 131243 [details] screen cap of 7.3B2 clean & build with -noexec /tmp
Created attachment 131244 [details] screen cap of 7.3RC2 clean & build with -noexec /tmp
Created attachment 131245 [details] screen cap of 7.3B2 clean & build with /tmp allowing exec
Created attachment 131246 [details] screen cap of 7.3RC2 clean & build with /tmp allowing exec
(In reply to comment #3) > It it unlikely that this worked in Beta 2. Really? If you're going to call me a liar, at least have the courtesy to have checked it out yourself first. I've attached screen caps showing the behavior in NetBeans, along with verification of my mount options on /tmp for each run. It worked on Beta 2 It did not with RC2. > When this (noexec) issue was reported for the first time, a special flag > "cnd.tmpbase" was introduced to make it possible to re-define a base of temp > files. So one can start nb with -J-Dcnd.tmpbase=/var/tmp/nbtmp to change the > default location. I searched before opening this bug, and found zero hits on "noexec". Searching just now, I find only this bug. I assume the issue you're referring to is Bug 216366. I was able to find it now, but only because I added "cnd.tmpbase" to the search string. No where in the release notes do I see reference to this issue, so while I thank you for the information on the workaround, I think perhaps adding it to release notes would be appropriate if will not be fixed in a cleaner way for 7.3 release. > This situation should be handled in a better way, for sure... That is indeed "for sure". > But this is not a showstopper as well as not a P2 issue. Given that there's a workaround (mount /tmp w/o -noexec, if that's an option, else set cnd.tmpbase), I would agree, though for it to be P3 your wiki states that there must be a "viable workaround". I'd say the workaround is only really "viable" if it's documented, no?
(In reply to comment #8) > (In reply to comment #3) > > It it unlikely that this worked in Beta 2. > > Really? > > If you're going to call me a liar, at least have the courtesy to have checked > it out yourself first. > ;) Wow, wow.. Not so aggressive, please.. Nobody wanted to call you a liar - it was just an assumption (unlikely != it was not). > I've attached screen caps showing the behavior in NetBeans, along with > verification of my mount options on /tmp for each run. > > It worked on Beta 2 > > It did not with RC2. OK, thanks for the screenshots - I'll take a closer look on the issue, but the first thing I did is I tried to provide an information about possible available workaround. > > > When this (noexec) issue was reported for the first time, a special flag > > "cnd.tmpbase" was introduced to make it possible to re-define a base of temp > > files. So one can start nb with -J-Dcnd.tmpbase=/var/tmp/nbtmp to change the > > default location. > > I searched before opening this bug, and found zero hits on "noexec". Searching > just now, I find only this bug. > > I assume the issue you're referring to is Bug 216366. I was able to find it > now, but only because I added "cnd.tmpbase" to the search string. > > No where in the release notes do I see reference to this issue, so while I > thank you for the information on the workaround, I think perhaps adding it to > release notes would be appropriate if will not be fixed in a cleaner way for > 7.3 release. > > > This situation should be handled in a better way, for sure... > > That is indeed "for sure". > > > But this is not a showstopper as well as not a P2 issue. > > Given that there's a workaround (mount /tmp w/o -noexec, if that's an option, > else set cnd.tmpbase), I would agree, though for it to be P3 your wiki states > that there must be a "viable workaround". I'd say the workaround is only really > "viable" if it's documented, no? Yep. I agree that this information should go to the release notes.
(In reply to comment #9) Sorry - your answer seemed to be a pretty direct dismissal of my assertion. Regardless, I suppose I could have been more clear that I had verified behavior; perhaps including screen caps up front.
Hrm - I'm trying your workaround, but with no success. I edited /opt/netbeans/netbeans-7.3rc2/etc/netbeans.conf to add either "-J-Dcnd.tmpbase=/var/tmp" or "-J-Dcnd.tmpbase=/var/tmp/nbtmp" to netbeans_default_options, and it seems to have no effect. The error in output is still: ------ Cannot run program "/tmp/dlight_gregj/33e48052/01004131055/pty": error=13, Permission denied CLEAN FAILED (exit value -2, total time: 60ms) ------
(In reply to comment #11) > Hrm - I'm trying your workaround, but with no success. Agree
sindisil, Valera, I see what's going on... It's a typo in the http://hg.netbeans.org/cnd-main/rev/0a835f7d4d7d (that is why passing cnd.tmpbase has no effect). I guess there is something like "Ignoring cnd.tmpbase property..." in your messages.log... It could be easily fixed. I will fix it today. Valera, is it a showstopper? sindisil, thanks for finding the issue! =Andrew
(In reply to comment #13) > Valera, is it a showstopper? No I think. But issue can be fixed in patch1.
(In reply to comment #13) Sweet. Thanks for digging in and finding root cause, Andrew! Glad it's an easy fix.
(In reply to comment #14) I understand you have a release to ship, but think it's unfortunate that folks will need to choose between a useful security configuration and all the goodness that's coming in 7.3.
Well, I have fixed a typo and now at least cnd.tmpbase should have effect. [http://hg.netbeans.org/cnd-main/rev/3772eaebd91f] Another workaround that could be used (even on the current code) is that one can give -J-Djava.io.tmpdir=</var/tmp/nbtmp> to redefine the directory to use. But this option has more global effect, so this directory will be used not for our dlight_* stuff only...
Integrated into 'main-golden', will be available in build *201302122300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/3772eaebd91f User: Andrew Krasny <akrasny@netbeans.org> Log: Bug #225920 - C makefile build fails with "Permission denied"
I'll close this issue with the current fix (use of cnd.tmpbase property) to make it a candidate for 73 patch. I'll open another IZ for enhancing usability improvements for this situation.
Verified in trunk 201303112300 I can launch sample via -J-Dcnd.tmpbase=/var/tmp/nbtmp flag
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/1adce2768213 User: Andrew Krasny <akrasny@netbeans.org> Log: Bug #225920 - C makefile build fails with "Permission denied" (transplanted from 3772eaebd91ff483d3b078e7f6463589aba2570d) (transplanted from d12dda9844e733c7545cd113ecda54077518bba4)
Verified in build 201303172200
I was glad to see it is fixed, because I have this very annoying bug in 7.3 too, but just now I installed 7.4 and it still gives me this bug?!? I have Ubuntu 12.10 with gcc Ubuntu/Linaro 4.6.3-10ubuntu1 I created a new project from existing code with the following Makefile: --- # makefile for NetBeans 7.4 test CPP = g++ CFLAGS = -I /usr/local/include -Wall LFLAGS = -L /usr/local/lib64 -L /usr/local/lib -lm all = testprog OBJS = testprog.o testprog: ${OBJS} ${CPP} -o $@ ${OBJS} ${LFLAGS} %.o : %.cpp ${CPP} ${CFLAGS} -o $@ -c $< clean: rm -f testprog *.o core *~ *.bak --- testprog.cpp: --- #include <iostream> int main(int argc, char* argv[]) { std::cout << "Hello, world!" << std::endl; } --- This builds fine from the command line. However, in NetBeans, upon building the code with F11 I got the same as before: --- Cannot run program "/tmp/dlight_anneke/751a23a2/1763953319/pty": error=13, Permission denied MAKE FAILED (exit value -2, total time: 52ms) --- The about box says this among other things: --- Product Version: NetBeans IDE 7.4 (Build 201310111528) Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2 --- Is the bug back??? Please help!!
(In reply to sicherer from comment #23) > Is the bug back??? Please help!! Do you speak "I use -J-Dcnd.tmpbase=/var/tmp/nbtmp flag, but run and build fails"?