# Pi install script --nodered-user option leaving folder owned by root

**URL:** https://discourse.nodered.org/t/pi-install-script-nodered-user-option-leaving-folder-owned-by-root/88871
**Category:** Core Development
**Created:** [23 June 2024 03:03 UTC](https://discourse.nodered.org/t/pi-install-script-nodered-user-option-leaving-folder-owned-by-root/88871 "2024-06-23T03:03:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![KoenWindey](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/koenwindey/32/7900_2.png) [@KoenWindey](https://discourse.nodered.org/u/KoenWindey)
#### Post date: [23 June 2024 03:03 UTC](https://discourse.nodered.org/t/pi-install-script-nodered-user-option-leaving-folder-owned-by-root/88871/1 "2024-06-23T03:03:56Z")

</div>

Hi, I'm trying to deploy Node-Red through provisioning in Vagrant. Since provisioning scripts run as root (or as user vagrant if you tick the option 'not-priviliged') I wanted to use the --nodered-user option available in the debian install script, see:  
here: [https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/](https://discourse.nodered.org/t/specify-user-in-the-update-nodejs-and-nodered-script/)  
and here: [https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)

It works all fine for installation, but node-red fails to launch due to a permissions issue when it tries to copy the settings file to the /home/my\_user/.node-red folder. Turns out that the script creates the folder with root ownership.

This seems like a bit of an oversight? I mean if you want to install as a different user, wouldn't the script then also set the ownership of the folders correctly? I fixed it manually by simply doing "chown my\_user:my\_user /home/my\_user/.node-red", but I thought I'd flag it here as perhaps a suggestion for improvement?

Thanks  
Koen

---

<div class="post-metadata">

### Author: ![GogoVega](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gogovega/32/71313_2.png) [@GogoVega](https://discourse.nodered.org/u/GogoVega)
#### Post date: [23 June 2024 21:14 UTC](https://discourse.nodered.org/t/pi-install-script-nodered-user-option-leaving-folder-owned-by-root/88871/2 "2024-06-23T21:14:48Z")

</div>

I think it's fixed

> <https://github.com/node-red/linux-installers/commit/7bea1c24939d0e91914749786fb6f012fc47089f>

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [22 August 2024 21:14 UTC](https://discourse.nodered.org/t/pi-install-script-nodered-user-option-leaving-folder-owned-by-root/88871/3 "2024-08-22T21:14:54Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
