Giter Site home page Giter Site logo

File ownership issues about node-deb HOT 4 CLOSED

heartsucker avatar heartsucker commented on July 22, 2024
File ownership issues

from node-deb.

Comments (4)

empierre avatar empierre commented on July 22, 2024

another remark, if installing as a user, its how directory must be writable by npm:

if ! [ -d '/var/www' ]; then
mkdir -p '/var/www'
fi
chown 'www-data:www-data' '/var/www/'

from node-deb.

heartsucker avatar heartsucker commented on July 22, 2024

@empierre I'm finally getting around to looking at this, and I don't think I understand what the file issues are here. It looks like you're using a custom postinst script to put things into /var/www, so I don't think I can help you here. I did a release with a number of changes since this was reported.

So can I get you to:

  • Try it again with the latest version of node-deb
  • Report back you whole package.json and command line args and templates so I can see what may have gone wrong

from node-deb.

empierre avatar empierre commented on July 22, 2024

@heartsucker I wanted to use www-data user already existing, maybe not a good idea since its home does not belong to him...

I have merged with your code but had to keep the old way in case the node_modules was missing (migration issue for packages existing prior to node_modules embedded in the package.

npm_install() {
cd "/usr/share/$1/app"
sudo npm config set loglevel warn
if [ -e 'node_modules' ]; then
sudo -u www-data npm rebuild
else
sudo -u www-data npm install --production
fi
#sudo -u www-data npm config set loglevel warn
}

from node-deb.

heartsucker avatar heartsucker commented on July 22, 2024

@empierre The error with node_modules went unnoticed and will be fixed in the next release. If you're using an existing user and file ownership issues happen, I think that's outside the scope of this tool. I think manually setting your templates is a sufficient workaround

I'm going to close this. If you feel like this issues was inadequately addressed, I can reopen it.

from node-deb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.