Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 108252 - Changing file permissions on startup
Changing file permissions on startup
Product: ruby
Classification: Unclassified
Component: Platform
All Linux
: P3 (vote)
: 6.x
Assigned To: Martin Krauskopf
: 104385 107410 (view as bug list)
Depends on: 24357
  Show dependency treegraph
Reported: 2007-06-27 10:07 UTC by Michal Zlamal
Modified: 2008-09-25 15:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Michal Zlamal 2007-06-27 10:07:18 UTC
the 6.0 M10 - 200706262201 build:
full install on Linux as a root.

While runing as user, the Ruby tries to change file permissions, which is of course impossible.
I see this also as a security issue - user software tries to modify file permissions.
This exception is raised on every startup => P1 could not run [/bin/chmod, u+rx, gem, jirb, rake, rdoc, spec, jruby.bat, jirb_swing.bat,
generate_yaml_index.rb, gemri, jruby, rails, gem_mirror, jruby.rb, jrubycli, jrubysrv, spec_translator, gem_server,
gemwhich.bat, gemwhich, gem.bat, gemlock, update_rubygems, jirb_swing, jrubyc, _jrubycleanup.bat, testrb,
gem_server.bat, _jrubysetcp.bat, _jrubyvars.bat, jirb.bat, jrubyd.bat, jrubyw.bat, index_gem_repository.rb,
_jrubyvmopts.bat, gem_mirror.bat] : Exit value=1
	at org.netbeans.api.ruby.platform.RubyInstallation.ensureExecutable(
	at org.netbeans.modules.ruby.rubyproject.RubyProjectModuleInstaller.restored(
	at org.netbeans.core.startup.NbInstaller.loadCode(
	at org.netbeans.core.startup.NbInstaller.load(
	at org.netbeans.ModuleManager.enable(
	at org.netbeans.core.startup.ModuleList.installNew(
	at org.netbeans.core.startup.ModuleList.trigger(
	at org.netbeans.core.startup.ModuleSystem.restore(
	at org.netbeans.core.startup.Main.getModuleSystem(
	at org.netbeans.core.startup.Main.start(
[catch] at
Comment 1 Tomas Danek 2007-06-27 14:11:59 UTC
Permissions modifications in module installer are not necessary at the moment when it is guaranteed that jruby binaries
have executable permissions set, no matter where user got the build (installer, hudson, some custom build, ...)
Comment 2 Torbjorn Norbye 2007-06-27 16:36:16 UTC
The module is doing a chmod in the ModuleInstall on all the JRuby files because that is the only* way to make JRuby work with Auto Update.

*=Only way I know of, and I did ask around. There was also a similar question on nbdev two days ago where Jesse gave pretty much the same answer.

   Gordon Prieur wrote:
    >is there any way I can install an nbm with execution bits turned on
    >or do I have to do that from my module?

    I think you need to use ModuleInstall + InstalledFileLocator.

I would love to be able to annotate these bits with executable permission somehow in the NBM and have the Auto Update client restore this state when the 
NBM is installed, rather than doing this each and every time.

One thing I could do now is to just -silently- try chmodding - in other words, catch and swallow any IO exceptions that result.

I'm not sure what the security implications are here.

(Btw this is a duplicate, I should dig up the others and combine them)
Comment 3 Torbjorn Norbye 2007-06-27 18:33:04 UTC
I'm silently logging IO exceptions now rather than causing the printstacktrace popup. Reducing priority. Fixing this completely will depend on issue 24357. 

IDE: [6/27/07 10:28 AM] Committing started
Checking in src/org/netbeans/api/ruby/platform/;
/cvs/scripting/ruby/platform/src/org/netbeans/api/ruby/platform/,v  <--
new revision: 1.30; previous revision: 1.29
Checking in;
/cvs/scripting/ruby/platform/,v  <--
new revision: 1.22; previous revision: 1.21
IDE: [6/27/07 10:28 AM] Committing finished
Comment 4 Torbjorn Norbye 2007-06-27 18:33:51 UTC
*** Issue 107410 has been marked as a duplicate of this issue. ***
Comment 5 Torbjorn Norbye 2007-06-27 18:34:40 UTC
*** Issue 104385 has been marked as a duplicate of this issue. ***
Comment 6 Jiri Kovalsky 2007-07-03 14:00:18 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 7 Torbjorn Norbye 2007-08-10 01:29:48 UTC
I can't fix this until the plugin manager supports file permissions
Comment 8 Martin Krauskopf 2008-09-25 15:06:03 UTC
Nothing else to fix here. We can't do more here.

BTW NetBeans runs JRuby through 'java', so no issue from NetBeans + JRuby.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo