Meteor 1.4.2: You are attempting to run Meteor as the "root" user


#1

Ubuntu 16.04, update from 1.4.1.3 to 1.4.2:

meteor update --patch

You are attempting to run Meteor as the “root” user. If you are developing,
this is almost certainly not what you want to do and will likely result in
incorrect file permissions. However, if you are running this in a build process
(CI, etc.) or you are absolutely sure you know what you are doing, add the
--unsafe-perm flag to this command to proceed.

sudo meteor from user,
and any experiments with flags have not given result,
are you confirm it?


#2

This is correct. It fixes this issue:


#3

$ sudo meteor --unsafe-perm update --patch
’/home/orloff/.meteor’ exists, but ‘/home/orloff/.meteor/meteor’ is not executable.
Remove it and try again.

meteor --unsafe-perm update --patch

–unsafe-perm: unknown option.
?


#4

so, is it possible update to meteor 1.4.2 in Ubuntu now?


#5

Yes - but if you’ve previously installed Meteor as root it may be worth taking a little time to remove the old Meteor. That’s normally rm -rf ~/.meteor and re-install not-as-root, but if you’ve also been running it as root, you’ll also need to change ownership of all your project files.


#6

thanks,
I have done all as you say, remove, install from me,
then in my project folder:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

try:
$ meteor --settings settings.json

/home/me/.meteor/packages/meteor-tool/.1.4.2.1r0536n++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/cli/dev-bundle.js:117
      throw e;
      ^
Error: EACCES: permission denied

I’m doing this

ls -al /home/me/dst-orders/.meteor/local/dev_bundle
lrwxrwxrwx 1 me root 72 лис  1 09:50 /home/me/my-project/.meteor/local/dev_bundle -> /root/.meteor/packages/meteor-tool/1.4.1_2/mt-os.linux.x86_64/dev_bundle

I’m a bit at a loss…


#7

I think that you need to ensure the ownership of all project files is not root. I would navigate to the project root and do a recursive chown:

cd /path/to/myproject
chown -R myusername:myusername .

You will need to do this as root, because I suspect some files will be owned by root.