Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2011 14:25:58 +0100
From:      "Michael Ross" <gmx@ross.cx>
To:        freebsd-questions@freebsd.org, "Tomasz Kowalczyk" <kowalczfbsd@gmail.com>
Subject:   Re: Certain users can't start python
Message-ID:  <op.v6doxkvpg7njmm@michael-think>
In-Reply-To: <201112121322.33850.kowalczfbsd@gmail.com>
References:  <op.v6c2y8ojg7njmm@michael-think> <201112121322.33850.kowalczfbsd@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 12.12.2011, 13:22 Uhr, schrieb Tomasz Kowalczyk <kowalczfbsd@gmail.com>:

> On Monday 12 of December 2011 06:31:46 Michael Ross wrote:
>> Hello,
>>
>> I am ... stuck.
>>
>> I've been trying to setup mercurials web frontend with apache,
>> but apache won't start python.
>> Not as cgi-script, not with mod_python.
>>
>> Investigating, I found this not only to be a problem with apache.
>>
>> Situation now:
>> Users "michael" and "root" can run python.
>> All others can't:
>>
>> 	Could not find platform independent libraries <prefix>
>> 	Could not find platform dependent libraries <exec_prefix>
>> 	Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
>> 	ImportError: No module named site
>>
>>
>> For troubleshooting, I cloned "michael" to an new user "dummy",
>> i. e. I created the user, copied all .dotfiles from "michael" over,
>> adjusted permissions.
>> "dummy" can't start python either.
>
> Is user 'dummy' in same groups that 'michael' is ?

No, it wasn't. I forgot to add it to the "wheel" group. ("Missing  
something obvious" alright).

> I think it can be something with permissions, maybe files in
> /local/lib/python2.7/ got strange permissions ?

That was it: /usr/local/lib/python2.7 was chmodded 770.
No idea why.

Thanks!


> Basically module 'site' (site.py in detail) is loaded by interpreter on  
> early
> start, so if it can't read it , python will raise this error.
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to  
> "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.v6doxkvpg7njmm>