Skip to content
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

"Empty or outdated config file. Please run ‘config activate’ and retry" while upgrading on OS X El Capitan #161

Closed
ghost opened this issue Oct 21, 2015 · 48 comments

Comments

@ghost
Copy link

ghost commented Oct 21, 2015

Problem

The installer fails when upgrading from Prey 1.4.1 or older. The title is the actual problem.

When running the config activate command you get this output,

screen 20shot 202015-10-20 20at 2005 24 00

How it was detected

Tons of user feedback.

Suggested solution

Fix the upgrading process.

More info

@ghost
Copy link
Author

ghost commented Nov 16, 2015

Performing a complete uninstall won't solve the issue.

sudo /usr/local/lib/prey/current/bin/prey config hooks pre_uninstall && sudo rm -rf /etc/prey /usr/local/lib/prey /var/log/prey.log

@markdrayton247
Copy link

my install path seems different: /usr/local/lib/prey/versions/1.4.2/bin/prey however I have the exact same issue here. have scrubbed off old install with help of prey support, error still occuring

@mauricioschneider
Copy link
Contributor

@markdrayton247 Can you check if there's any content under /etc/prey/, please?

@markdrayton247
Copy link

there is none.

@mauricioschneider
Copy link
Contributor

In that case, could you please run the following commands and see if you can complete the configuration process?

sudo cp /usr/local/lib/prey/versions/1.4.2/prey.conf.default /etc/prey/prey.conf
sudo chown prey:wheel /etc/prey/prey.conf
sudo /usr/local/lib/prey/versions/1.4.2/bin/prey config gui (It takes a few seconds to load the gui).

@markdrayton247
Copy link

yes that works, thanks
2nd line should be: sudo chown prey:wheel /etc/prey/prey.conf
(however i still can't locate the device, which is why i tried reinstalling..)

@mauricioschneider
Copy link
Contributor

Thanks, I fixed my previous comment.

What is the /var/log/prey.log file showing?

@markdrayton247
Copy link

nothing, empty

@mauricioschneider
Copy link
Contributor

What about ps aux | grep prx?

If the previous command returns nothing, then try the following: sudo launchctl load /Library/LaunchDaemons/com.prey.agent.plist and check the config file again.

@markdrayton247
Copy link

/Library/LaunchDaemons/com.prey.agent.plist: No such file or directory

@mauricioschneider
Copy link
Contributor

Ok, so let's try running the post_install hooks: sudo /usr/local/lib/prey/versions/1.4.2/bin/prey config hooks post_install, and then try again to load the agent plist.

Thanks for your patience, by the way.

@markdrayton247
Copy link

Running "config activate" as prey

Error running command: spawn EACCES

-- This is probably because the new prey user does not have
-- read and exec access to the full path: /usr/local/lib/prey/versions/1.4.2/bin
Error! Command failed:

plist still no such file... thanks for helping

@mauricioschneider
Copy link
Contributor

Ok, so let's ensure the prey user does have access to the full path, with the following command:

sudo chown -R prey:wheel /usr/local/lib/prey

and then re-run the sudo /usr/local/lib/prey/versions/1.4.2/bin/prey config hooks post_install command.

@markdrayton247
Copy link

Running "config activate" as prey

Error running command: spawn EACCES

-- This is probably because the new prey user does not have
-- read and exec access to the full path: /usr/local/lib/prey/versions/1.4.2/bin
Error! Command failed:

@mauricioschneider
Copy link
Contributor

That's really weird. I'll have to give it a closer look and get back to you later.

@mauricioschneider
Copy link
Contributor

@markdrayton247 In a brief moment of brightness I came up with an idea. Could you please try running this? sudo -u prey ls -al /usr/local/lib/prey

@markdrayton247
Copy link

ls: /usr/local/lib/prey: Permission denied

(yes I did sudo)

On 17 November 2015 at 16:17, Mauricio Schneider notifications@github.com
wrote:

@markdrayton247 https://github.com/markdrayton247 In a brief moment of
brightness I came up with an idea. Could you please try running this? sudo
-u prey ls -al /usr/local/lib/prey


Reply to this email directly or view it on GitHub
#161 (comment)
.

@mauricioschneider
Copy link
Contributor

Ok, that was the intended output.

Could you please try running these:

sudo chown $(whoami):admin /usr/local/
sudo chown $(whoami):admin /usr/local/lib
sudo /usr/local/lib/prey/versions/1.4.2/bin/prey config hooks post_install

@markdrayton247
Copy link

ends with:

Running "config activate" as prey

Error running command: spawn EACCES

-- This is probably because the new prey user does not have

-- read and exec access to the full path:
/usr/local/lib/prey/versions/1.4.2/bin

Error! Command failed:

On 17 November 2015 at 17:21, Mauricio Schneider notifications@github.com
wrote:

Ok, that was the intended output.

Could you please try running these:

sudo chown $(whoami):admin /usr/local/
sudo chown $(whoami):admin /usr/local/lib
sudo /usr/local/lib/prey/versions/1.4.2/bin/prey config hooks post_install


Reply to this email directly or view it on GitHub
#161 (comment)
.

@mauricioschneider
Copy link
Contributor

Does it end with error this time? If not, could you check if there's a .plist now?

sudo launchctl load /Library/LaunchDaemons/com.prey.agent.plist

@markdrayton247
Copy link

yes, no plist exists. error is :

Error running command: spawn EACCES

-- This is probably because the new prey user does not have
-- read and exec access to the full path: /usr/local/lib/prey/versions/1.4.2/bin
Error! Command failed:

@mauricioschneider
Copy link
Contributor

Perhaps it's a problem with the Prey user, what happens if you run this:

sudo /usr/local/lib/prey/versions/1.4.2/lib/conf/tasks/utils/create_user.sh prey

@mauricioschneider
Copy link
Contributor

Also, could you please re-check what are the permissions for the following folders:

ls -al /usr/ | grep local
ls -al /usr/local | grep lib
ls -al /usr/local/lib | grep prey

@markdrayton247
Copy link

the create_user script gives:
prey user already exists!

prey already seems to have impersonation privileges. Skipping...

drwxr-xr-x 8 markdrayton admin 272 4 Nov 11:46 local
drwx------ 4 markdrayton admin 136 16 Nov 20:16 lib
drwxr-xr-x 3 prey wheel 102 16 Nov 20:16 prey

@mauricioschneider
Copy link
Contributor

Could you please run sudo chmod 755 /usr/local/lib and then retry sudo /usr/local/lib/prey/versions/1.4.2/bin/prey config hooks post_install?

@markdrayton247
Copy link

now we're getting somewhere :

Running post_activate hooks...

Voila! All good.

Installing init scripts.

Sweet! Please run prey config gui to finish installation.

Voila! All good.

On 17 November 2015 at 19:36, Mauricio Schneider notifications@github.com
wrote:

Could you please run sudo chmod 755 /usr/local/lib and then retry sudo
/usr/local/lib/prey/versions/1.4.2/bin/prey config hooks post_install?


Reply to this email directly or view it on GitHub
#161 (comment)
.

@markdrayton247
Copy link

ran the gui, all seems cool now, preyproject can connect to this machine.

I'm not sure how I got into such a mess, but you are a patient and very
helpful man. thank you sir.

On 17 November 2015 at 19:46, Mark Drayton markdrayton@gmail.com wrote:

now we're getting somewhere :

Running post_activate hooks...

Voila! All good.

Installing init scripts.

Sweet! Please run prey config gui to finish installation.

Voila! All good.

On 17 November 2015 at 19:36, Mauricio Schneider <notifications@github.com

wrote:

Could you please run sudo chmod 755 /usr/local/lib and then retry sudo
/usr/local/lib/prey/versions/1.4.2/bin/prey config hooks post_install?


Reply to this email directly or view it on GitHub
#161 (comment)
.

@mauricioschneider
Copy link
Contributor

On the contrary; you sir are the hero, thank you. This helped me identify an edge case which caused this issue. Now I'll be able to fix it in our next release.

@sevenlayercookie
Copy link

Just wanted to say that I had this problem also with 1.4.2 on El Capitan, installing Prey for the first time ever. I followed your instructions in the last few posts and it fixed my problems. Thanks!

@Monochrome001
Copy link

Hi everyone,

Could it possible for one of you to do "beginner" tutorial for that operation ? I'm also on El Capitan, I've got the same problem, but I'm lost with these instructions, even if I understood that all of that are commands to input in Terminal.

Thank you all

@mauricioschneider
Copy link
Contributor

Hello @Monochrome001, I'll be releasing 1.5.0 on Wednesday and the OS X installer will include the extra permissions instruction needed for El Capitan.

@Monochrome001
Copy link

Thank you !

@mauricioschneider
Copy link
Contributor

This issue is fixed in the Prey v1.5.0 Mac OS X installer being released in a few minutes.

@kraftykaela
Copy link

I have installed Prey v1.5.0 on El Capitan and I still get the same "Empty or outdated config file. Please run 'config activate' and retry." when trying to log in (see attached screenshot).
screen shot 2016-02-04 at 6 47 58 pm

@jonwreed
Copy link

It would be great if this could be fixed, I am NOT entering sudo commands on my machine. But if this can ever be fixed by uninstalling and reinstalling let us know. Thx.

@tonsequitur
Copy link

tonsequitur commented Jun 30, 2016

I am having the same issue and need some clearer instructions too please.
After installing, I try to sign in with my existing account and get:
"Empty or outdated config file. Please run 'config activate' and retry."

I was able to install on my macbook OK: Yosemite 10.10.1
However, I am getting this error on my iMac: Yosemite 10.10.5

Installed prey-mac-1.6.1-x86.pkg

@tonsequitur
Copy link

followup: There was a permission issue for sudo so that Prey could not write to the system files. I couldn't fix the sudo permission problem so I upgraded to El Capitan and then the install worked fine.

@jonwreed
Copy link

jonwreed commented Jul 1, 2016

For the record being on El Capitan doesn't necessarily solve this problem. It's a serious open issue and in my case is happening on El Capitan Therefore the laptop I use the most and pay for is not protected by Prey. I hope this can be fixed in an updated release soon. Thanks.

@cyaconi
Copy link
Member

cyaconi commented Jul 1, 2016

Nice discovery @tonsequitur, prey user should have permission to access the config file once the installation ends.
@jonwreed Can you share the content of file /etc/sudoers.d/50_prey_switcher, if exists?

@javo
Copy link
Contributor

javo commented Jul 5, 2016

Hello @tonsequitur and @jonwreed
I believe I've found the cause of this issue but I need some confirmation. Could you please check you perrmissions for the following folders:
ls -al /usr/ | grep local
ls -al /usr/local | grep lib
ls -al /usr/local/lib | grep prey

Thanks!

@escapone
Copy link

escapone commented Aug 1, 2016

it is impossible to install EL CAPITAN mac on prey, it sais outdated config file all time. Anyone a solution?

@javo
Copy link
Contributor

javo commented Aug 1, 2016

Hello @escapone,
We now got this issue covered but the fix is gonna be available in the next release (1.6.2).
For now please run this command: sudo chmod -R 755 /usr/local and then retry the installation.
Please let me know how it went :)

@escapone
Copy link

escapone commented Aug 2, 2016

GREAT! Works like a charm! THX

@deeplypuzzled
Copy link

Just to confirm that I have had the same probem on 1.6.1 and lemavri's/javo's fix (I assume the chmod) fixed it for me. Many thanks.

@jonwreed
Copy link

Is the 1.6.2 release where this issue is fixed out yet? If not, any idea of timeframe? Thank you.

@javo
Copy link
Contributor

javo commented Aug 22, 2016

Hi @deeplypuzzled and @jonwreed,

Thanks for your comments, the new release with the fix for this issue is gonna be released this week. We're gonna let you know as soon as it's available.

@javo
Copy link
Contributor

javo commented Sep 1, 2016

The new release 1.6.2 is now available with the fix to this issue :)

@jonwreed
Copy link

jonwreed commented Sep 4, 2016

Thanks - the new release solved the issue for me. Took a while but appreciate you handling this, very happy my most important laptop now back online. Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests