RoastBeefSandwichCo / gatewayd-installers

Installation scripts for gatewayd et al.
1 stars 3 forks source link

gatewayd start script? #9

Open comready opened 10 years ago

comready commented 10 years ago

Should the first active line of the script be cd /home/shell_user_gatewayd/gatewayd because as far as I can tell we cannot actually log into the shell....... user only su to it?

Also I was running it from my own user but then I had to sudo chown geoff *.log in order for the logs to be written to as they belonged to root. Can/should it be run from shell_user_gatewayd and if so have I made a mistake in that my logs belonged to root?

xbrooks commented 10 years ago

The second line is cd ~/gatewayd. When run as shell_user_gatewayd, that's exactly where it goes :)

If your logs belong to root, you may have accidentally skipped user creation or the cd command or otherwise skipped some step and that led to creating/installing everything in /. Symptoms of this might include a node_modules or gatewayd in the root directory.

comready commented 10 years ago

If I "su" to another user "~" just remains the same. I am not a Ubuntu expert so is there some other way to "run as shell_user_gatewayd"? Are you testing on a physical box like me or on a VM or in the cloud?

I am a bit confused about users. At the beginning of the instructions you have "su root" but according to https://help.ubuntu.com/community/RootSudo "you cannot login as Root directly or use the su command to become the Root user" ... "prepend sudo to all the commands you would normally run as Root." Maybe this is some difference between lower case "r" and upper case or perhaps a difference between Ubuntu and other versions of Unix.

xbrooks commented 10 years ago

I'm glad you asked. You're right. The problem is that I forgot the root account is disabled by default.

It will take me some time to go through and change everything over to sudo. For now, the workaround is as follows:

#enable root login by setting password

sudo passwd

<enter password>

su root

Will leave this open until instructions accomodate.

xbrooks commented 9 years ago

Instructions updated. Close when verified (esp chpasswd)

comready commented 9 years ago

Maybe put this on hold for now.

If/when you return to this we should probably rename this issue and look further into Steven Zeiler's comment that "regarding using sudo with npm, it is advisable to set up your environment so that sudo is not required with NPM. In fact using sudo to install an NPM package is a well-known security vulnerability. Stackoverflow has solutions to the issue on several different platforms."