Quantcast

Update Center write permission check prevents users from updating

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Update Center write permission check prevents users from updating

bruehlicke
Nb 8.2 app installed by User. When User gets new updates via a private Update Center the Platform app returns with "Write Permission Problem", "You don't have permissions to install plugin xyz into the installation directory" - starting the app with "Run as administrator" does the trick. Some other installs work just fine.

From http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/overview-summary.html and http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/apichanges.html#check-write-permission I see some write permissions were added to the API since my earlier 6.5 based version which did not have this check.

Though I do understand the need to check for write permission, I am just confused why this is happening when it is the SAME user who installed the initial application locally and runs it locally and who is getting the updates locally to install - why the error - all the same user on same machine ?
 

Does any have some suggestions/best practices how to avoid this ?




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update Center write permission check prevents users from updating

stephen cumminger
You need to set:

nbm.is.global=false

in the Project Properties for each module you have. Without this, the updater is trying to install to the Program Files directory which is restricted. With this setting, the downloaded files will be saved in the User's AppData related folder for your app; which the app will find and apply on next startup.


Stephen Cumminger

-----Original Message-----
From: bruehlicke [mailto:[hidden email]]
Sent: Thursday, May 4, 2017 9:13 AM
To: [hidden email]
Subject: [platform-dev] Update Center write permission check prevents users from updating

Nb 8.2 app installed by User. When User gets new updates via a private Update Center the Platform app returns with "Write Permission Problem", "You don't have permissions to install plugin xyz into the installation directory" - starting the app with "Run as administrator" does the trick. Some other installs work just fine.

From http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/overview-summary.html and http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/apichanges.html#check-write-permission I see some write permissions were added to the API since my earlier 6.5 based version which did not have this check.

Though I do understand the need to check for write permission, I am just confused why this is happening when it is the SAME user who installed the initial application locally and runs it locally and who is getting the updates locally to install - why the error - all the same user on same machine ?
 

Does any have some suggestions/best practices how to avoid this ?




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update Center write permission check prevents users from updating

bruehlicke
Life saver. Thanx a lot ! Yes, I see my Branding module had nbm.is.global=true   never put that there but for sure that's the culprit causing all the headaches. For now I will also allow to modify the app.conf by adding -J-Dplugin.manager.install.global=false which also solves the issue.

On Thu, May 4, 2017 at 7:36 AM, stephen cumminger <[hidden email]> wrote:
You need to set:

nbm.is.global=false

in the Project Properties for each module you have. Without this, the updater is trying to install to the Program Files directory which is restricted. With this setting, the downloaded files will be saved in the User's AppData related folder for your app; which the app will find and apply on next startup.


Stephen Cumminger

-----Original Message-----
From: bruehlicke [mailto:[hidden email]]
Sent: Thursday, May 4, 2017 9:13 AM
To: [hidden email]
Subject: [platform-dev] Update Center write permission check prevents users from updating

Nb 8.2 app installed by User. When User gets new updates via a private Update Center the Platform app returns with "Write Permission Problem", "You don't have permissions to install plugin xyz into the installation directory" - starting the app with "Run as administrator" does the trick. Some other installs work just fine.

From http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/overview-summary.html and http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/apichanges.html#check-write-permission I see some write permissions were added to the API since my earlier 6.5 based version which did not have this check.

Though I do understand the need to check for write permission, I am just confused why this is happening when it is the SAME user who installed the initial application locally and runs it locally and who is getting the updates locally to install - why the error - all the same user on same machine ?


Does any have some suggestions/best practices how to avoid this ?





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Update Center write permission check prevents users from updating

bruehlicke
... another "Hack" to get around this until one has a chance to ship a new installer is simply to modify the updates.xml file. Search for global=true and remove from the XML. That seams to work as well. This way the user will not have to modify the app.conf file.

On Thu, May 4, 2017 at 9:09 AM, bruehlicke <[hidden email]> wrote:
Life saver. Thanx a lot ! Yes, I see my Branding module had nbm.is.global=true   never put that there but for sure that's the culprit causing all the headaches. For now I will also allow to modify the app.conf by adding -J-Dplugin.manager.install.global=false which also solves the issue.

On Thu, May 4, 2017 at 7:36 AM, stephen cumminger <[hidden email]> wrote:
You need to set:

nbm.is.global=false

in the Project Properties for each module you have. Without this, the updater is trying to install to the Program Files directory which is restricted. With this setting, the downloaded files will be saved in the User's AppData related folder for your app; which the app will find and apply on next startup.


Stephen Cumminger

-----Original Message-----
From: bruehlicke [mailto:[hidden email]]
Sent: Thursday, May 4, 2017 9:13 AM
To: [hidden email]
Subject: [platform-dev] Update Center write permission check prevents users from updating

Nb 8.2 app installed by User. When User gets new updates via a private Update Center the Platform app returns with "Write Permission Problem", "You don't have permissions to install plugin xyz into the installation directory" - starting the app with "Run as administrator" does the trick. Some other installs work just fine.

From http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/overview-summary.html and http://bits.netbeans.org/8.0/javadoc/org-netbeans-modules-autoupdate-services/apichanges.html#check-write-permission I see some write permissions were added to the API since my earlier 6.5 based version which did not have this check.

Though I do understand the need to check for write permission, I am just confused why this is happening when it is the SAME user who installed the initial application locally and runs it locally and who is getting the updates locally to install - why the error - all the same user on same machine ?


Does any have some suggestions/best practices how to avoid this ?






Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Update Center write permission check prevents users from updating

bruehlicke
In reply to this post by bruehlicke
As I do not see Stephen's answer I post it here. Stephen Cumminger did solve this issue for me. Here is his answer:


>
> You need to set:
>
> nbm.is.global=false
>
> in the Project Properties for each module you have. Without this, the updater is trying to install to the Program Files directory which is restricted. With this setting, the downloaded files will be saved in the User's AppData related folder for your app; which the app will find and apply on next startup.
>


Playing around a little more I found than my Branding module indeed had nbm.is.global=true in its nbproject/project.properties. Two other options which will work I found are:

1) Add  -J-Dplugin.manager.install.global=false  to the app.conf  file

2) Modify the updates.xml file directly by removing the
> global=true
 This might be a hack but gets you going so no users need to modify any files on their side.




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Update Center write permission check prevents users from updating

bruehlicke
In reply to this post by bruehlicke
... or by editing to
> global=false
 works as well




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Update Center write permission check prevents users from updating

bruehlicke
In reply to this post by bruehlicke
3) On the Plugin Manager screen (Settings Tab) the bottom under "Advanced" change "Default" to "Force install into user directory"




Loading...