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.

Bug 191700 - localhistory makes executable script un-executable
Summary: localhistory makes executable script un-executable
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Localhistory (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 193247 194057 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-07 04:03 UTC by speedogoo
Modified: 2011-10-26 14:25 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description speedogoo 2010-11-07 04:03:13 UTC
Using a dev version of netbeans with an empty userdir and latest JDK 7 b116:

  Product Version: NetBeans IDE Dev (Build 201010300000)
  Java: 1.7.0-ea; Java HotSpot(TM) 64-Bit Server VM 20.0-b01
  System: Linux version 2.6.32-25-generic running on amd64; UTF-8; en_US (nb)
  Userdir: /home/me/.netbeans/new

When I try to edit an executable script in editor, after make some change and save, the file goes un-executable, and I have to chmod a+x it. This happens on shell script, perl cgi, etc. Very frustrated.

Example:


$ ls -li /tmp/go
531496 -rwxr-xr-x 1 ww155710 ww155710 32 2010-11-07 11:59 /tmp/go

Edit and save in netbeans...

$ ls -li /tmp/go
531491 -rw-r--r-- 1 ww155710 ww155710 41 2010-11-07 12:00 /tmp/go

So, not x anymore, and inode also changed. Does this mean netbeans recreate the file without carrying the perm bits over?
Comment 1 speedogoo 2010-11-09 00:20:18 UTC
I tried an old dev version (2010-09-13) and it's OK, and the inode is never changed during editing/saving.
Comment 2 Marian Mirilovic 2010-11-10 10:28:59 UTC
Hmm, it works for me in NB 7.0 Beta, jdk6u22 x64, Ubuntu 10.04 x64
Comment 3 speedogoo 2010-11-12 03:10:15 UTC
It's still broken for me with 7.0m2 and JDK 6. Just make some small edit and save, after at most 3 times, the file goes un-executable. Is there a way I can debug?

Product Version: NetBeans IDE 7.0 M2 (Build 201010151251)
Java: 1.6.0_24-ea; Java HotSpot(TM) 64-Bit Server VM 19.1-b01
System: Linux version 2.6.32-25-generic running on amd64; UTF-8; en_US (nb)
Userdir: /home/ww155710/.netbeans/nothing

Mine is also ubuntu:

$ uname -m -r -s
Linux 2.6.32-25-generic x86_64

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04.1 LTS"
Comment 4 Jaroslav Tulach 2010-11-24 13:28:44 UTC
I believe this is caused by localhistory module. If I uninstall it, then the file remains executable.
Comment 5 Tomas Stupka 2010-11-25 10:12:56 UTC
http://hg.netbeans.org/cdev/rev/b58e3d65855e
fixed
Comment 6 Tomas Stupka 2010-11-25 10:14:45 UTC
http://hg.netbeans.org/core-main/rev/b58e3d65855e
Comment 7 Quality Engineering 2010-11-26 06:13:40 UTC
Integrated into 'main-golden', will be available in build *201011260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b58e3d65855e
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #191700 - localhistory makes executable script un-executable
Comment 8 Tomas Stupka 2010-12-13 13:10:08 UTC
*** Bug 193247 has been marked as a duplicate of this bug. ***
Comment 9 Ondrej Vrabec 2011-01-06 19:09:59 UTC
*** Bug 194057 has been marked as a duplicate of this bug. ***
Comment 10 dmuir 2011-10-21 03:01:34 UTC
Problem still exists in 7.0.1 and 7.1beta1

Create new PHP project:

$ ls -l index.php
-rw-rw-r-- 1 dmuir dmuir 232 2011-10-21 13:51 index.php

$ chmod g-w index.php && ls -l index.php
-rw-r--r-- 1 dmuir dmuir 232 2011-10-21 13:51 index.php

modify the file in netbeans and save

$ ls -l index.php
-rw-rw-r-- 1 dmuir dmuir 232 2011-10-21 13:51 index.php

Disabling the localhistory plugin fixes things.
Comment 11 Tomas Stupka 2011-10-25 13:30:55 UTC
fixed in core-main #51915453eb6a
Comment 12 Quality Engineering 2011-10-26 14:25:24 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/51915453eb6a
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #191700 - localhistory makes executable script un-executable

the fix for Issue #182246 is causing trouble on non windows filesystems where users might have other then default file permissions.