-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File ownership issues #18
Comments
another remark, if installing as a user, its how directory must be writable by npm: if ! [ -d '/var/www' ]; then |
@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 So can I get you to:
|
@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() { |
@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. |
First reported by @empierre on issue #16. New ticket for organization.
also had issues of npm unpak issues, had to add this to correct the issue (clean cache and install as an unprivillegied user:
preinst:
npm cache clean
postint:
chown 'www-data:www-data' '/var/www/'
chown -R 'www-data:www-data' '/usr/share/mydomoathome'
npm_install() {
cd "/usr/share/$1/app"
if [ -e 'node_modules' ]; then
rm -rf 'node_modules'
fi
sudo -u www-data npm install --production
}
The text was updated successfully, but these errors were encountered: