Re: django-admin.py --> permission denied (shared server deployment)

2015-05-19 Thread x
hey, 

thanks for the quick responses!
before i go any further on installing i need to think about 
tom evans advise:

> Incidentally, having your python code installed inside your htdocs is
> a stunningly bad idea even if you can get it to work, as anyone who
> can guess the path to a particular file would be able to read its
> contents.

but there is something i didn't understand: couldn't i go into the permissions 
and do something like "chmod u-xwr " if i wouldn't want one reading 'a 
specific' file? 

i already found a host who's more python-friendly 
then the one i'm currently stuck with ("1&1" in germany). 

cheers
florian


On May 19, 2015, at 6:50 PM, Andrew Farrell  wrote:

> Hello Florian,
> 
> If you are having trouble installing python without root permissions, you 
> should consider installing the miniconda distribution of python that is used 
> in the scientific computing community. Assuming you are on a linux server, 
> you can do this with
> 
> wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
> chmod +x ./Miniconda-latest-Linux-x86_64.sh
> ./Miniconda-latest-Linux-x86_64.sh -b
> conda update conda
> conda create --name try_django django
> source activate try_django
> 
> This will set you up with an isolated conda environment (similar to a 
> virtualenv environment) where you can install packages without touching 
> anyone else's packages. From there you can do
> 
> django-admin.py startproject test_project
> cd test_project
> python manage.py migrate
> python manage.py runserver 0.0.0.0:8000
> 
> And to get yourself set up with the django dev server running on top of 
> sqlite.
> You can see the documentation for conda here.
> 
> On Tue, May 19, 2015 at 3:04 AM, x  wrote:
> hello hello,
> 
> finally i was able to install a python instance on my shared-server.
> it was also impossible to pip-install django. yeah.
> 
> but right then - so close already - i got a permission problem again.
> i couldn't figure out exactly what django-admin.py wants to do/execute and 
> why it's
> not satisfied with my nice brand new local python 2.7.9 instance.. muhhuuu.
> 
> this is the ssh prompt:
> 
> > (uiserver):u74138225:~/django_build >  django-admin.py startproject test 
> > --user-
> > bash: 
> > /customers/homepages/45/d5012545412/htdocs/python27/bin/django-admin.py: 
> > Permission denied
> 
> for any suggestions how to domesticate django on this shared server i'd be 
> very happy.
> 
> thanks and all the best
> florian
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/D96C8E64-18CA-4E2A-B9BD-D384AD563766%40zetteeh.net.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CA%2By5TLYtn9e44mrY%3DrV_JXXXL2p0f0FuzEXcD2N3SQywG%2BWVcw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/DB203D03-1922-4448-ACFB-855C4426C325%40zetteeh.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Also: installing postgres w/o root Re: django-admin.py --> permission denied (shared server deployment)

2015-05-19 Thread Andrew Farrell
Hi Florian

It occurs to me that, you may want to install postgresql, a more powerful
database. Here is how to do so without root permissions:

conda install --channel https://conda.binstar.org/bkreider postgresql
psycopg2
which psql
createuser -s test_user1 --pwprompt --createdb --no-superuser
--no-createrole
createdb -U test_user1 --locale=en_US.utf-8 -E utf-8 -O test_user1
test_database1 -T template0

This will install both postgres and the python-postgres adapter into the
isolated environment. It will then create a postgres user and ask you for a
password. I'll assume you gave it the password "testpass" for the purpose
of this tutorial. Then, it will create a database owned by that user and
using UTF-8 encoding.

Now, we just need to configure django use this. Open settings.py and at
line 77, change the DATABASES variable to look like

DATABASES = {
'default': {
  'ENGINE': 'django.db.backends.postgresql_psycopg2',
  'NAME': 'test_database1',
  'USER': 'test_user1',
  'PASSWORD': 'testpass',
  'HOST': 'localhost',
  'PORT': '5432',
}
}

Then you can set up your tables with

python manage.py migrate

You can also log in to the database with

python manage.py dbshell

On Tue, May 19, 2015 at 11:50 AM, Andrew Farrell 
wrote:

> Hello Florian,
>
> If you are having trouble installing python without root permissions, you
> should consider installing the miniconda
>  distribution of python that is
> used in the scientific computing community. Assuming you are on a linux
> server, you can do this with
>
> wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
> chmod +x ./Miniconda-latest-Linux-x86_64.sh
> ./Miniconda-latest-Linux-x86_64.sh -b
> conda update conda
> conda create --name try_django django
> source activate try_django
>
> This will set you up with an isolated conda environment (similar to a
> virtualenv environment) where you can install packages without touching
> anyone else's packages. From there you can do
>
> django-admin.py startproject test_project
> cd test_project
> python manage.py migrate
> python manage.py runserver 0.0.0.0:8000
>
> And to get yourself set up with the django dev server running on top of
> sqlite.
> You can see the documentation for conda here .
>
> On Tue, May 19, 2015 at 3:04 AM, x  wrote:
>
>> hello hello,
>>
>> finally i was able to install a python instance on my shared-server.
>> it was also impossible to pip-install django. yeah.
>>
>> but right then - so close already - i got a permission problem again.
>> i couldn't figure out exactly what django-admin.py wants to do/execute
>> and why it's
>> not satisfied with my nice brand new local python 2.7.9 instance..
>> muhhuuu.
>>
>> this is the ssh prompt:
>>
>> > (uiserver):u74138225:~/django_build >  django-admin.py startproject
>> test --user-
>> > bash:
>> /customers/homepages/45/d5012545412/htdocs/python27/bin/django-admin.py:
>> Permission denied
>>
>> for any suggestions how to domesticate django on this shared server i'd
>> be very happy.
>>
>> thanks and all the best
>> florian
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/D96C8E64-18CA-4E2A-B9BD-D384AD563766%40zetteeh.net
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2By5TLat3yNPo1oP7LFHpxp9YKWCj2wbsYOHx_vGSxk3EcGBBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-admin.py --> permission denied (shared server deployment)

2015-05-19 Thread Andrew Farrell
Hello Florian,

If you are having trouble installing python without root permissions, you
should consider installing the miniconda
 distribution of python that is
used in the scientific computing community. Assuming you are on a linux
server, you can do this with

wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
chmod +x ./Miniconda-latest-Linux-x86_64.sh
./Miniconda-latest-Linux-x86_64.sh -b
conda update conda
conda create --name try_django django
source activate try_django

This will set you up with an isolated conda environment (similar to a
virtualenv environment) where you can install packages without touching
anyone else's packages. From there you can do

django-admin.py startproject test_project
cd test_project
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

And to get yourself set up with the django dev server running on top of
sqlite.
You can see the documentation for conda here .

On Tue, May 19, 2015 at 3:04 AM, x  wrote:

> hello hello,
>
> finally i was able to install a python instance on my shared-server.
> it was also impossible to pip-install django. yeah.
>
> but right then - so close already - i got a permission problem again.
> i couldn't figure out exactly what django-admin.py wants to do/execute and
> why it's
> not satisfied with my nice brand new local python 2.7.9 instance.. muhhuuu.
>
> this is the ssh prompt:
>
> > (uiserver):u74138225:~/django_build >  django-admin.py startproject test
> --user-
> > bash:
> /customers/homepages/45/d5012545412/htdocs/python27/bin/django-admin.py:
> Permission denied
>
> for any suggestions how to domesticate django on this shared server i'd be
> very happy.
>
> thanks and all the best
> florian
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/D96C8E64-18CA-4E2A-B9BD-D384AD563766%40zetteeh.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2By5TLYtn9e44mrY%3DrV_JXXXL2p0f0FuzEXcD2N3SQywG%2BWVcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-admin.py --> permission denied (shared server deployment)

2015-05-19 Thread monoBOT
2015-05-19 13:32 GMT+01:00 Tom Evans :

> for any suggestions how to domesticate django on this shared server i'd be
> very happy.


​try
​python /customers/homepages/45/d5012545412/htdocs/python27/bin/django-admin.py
startapp myapp



-- 
*monoBOT*
Visite mi sitio(Visit my site): monobotsoft.es/blog/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BxOsGCoHb878PzFZ5Wo3dDZh6%2B8Jn3mj06ddGR_LcTN5WF1dA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: django-admin.py --> permission denied (shared server deployment)

2015-05-19 Thread Tom Evans
On Tue, May 19, 2015 at 9:04 AM, x  wrote:
> hello hello,
>
> finally i was able to install a python instance on my shared-server.
> it was also impossible to pip-install django. yeah.
>
> but right then - so close already - i got a permission problem again.
> i couldn't figure out exactly what django-admin.py wants to do/execute and 
> why it's
> not satisfied with my nice brand new local python 2.7.9 instance.. muhhuuu.
>
> this is the ssh prompt:
>
>> (uiserver):u74138225:~/django_build >  django-admin.py startproject test 
>> --user-
>> bash: 
>> /customers/homepages/45/d5012545412/htdocs/python27/bin/django-admin.py: 
>> Permission denied
>
> for any suggestions how to domesticate django on this shared server i'd be 
> very happy.

Web hosting platforms commonly (and should) have their htdocs on a
volume that is mounted with noexec, so that things cannot be executed.
Check with your hosting provider as to how they have things set up.

Incidentally, having your python code installed inside your htdocs is
a stunningly bad idea even if you can get it to work, as anyone who
can guess the path to a particular file would be able to read its
contents.

It might be worth contemplating a provider that is better suited to your needs.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1KJc%3D%2BGWoxQj_cZZ45qxUp4sNBiP9EmaOAfXXkB1cPYdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


django-admin.py --> permission denied (shared server deployment)

2015-05-19 Thread x
hello hello, 

finally i was able to install a python instance on my shared-server. 
it was also impossible to pip-install django. yeah. 

but right then - so close already - i got a permission problem again. 
i couldn't figure out exactly what django-admin.py wants to do/execute and why 
it's 
not satisfied with my nice brand new local python 2.7.9 instance.. muhhuuu. 

this is the ssh prompt: 

> (uiserver):u74138225:~/django_build >  django-admin.py startproject test 
> --user-
> bash: 
> /customers/homepages/45/d5012545412/htdocs/python27/bin/django-admin.py: 
> Permission denied

for any suggestions how to domesticate django on this shared server i'd be very 
happy. 

thanks and all the best 
florian 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/D96C8E64-18CA-4E2A-B9BD-D384AD563766%40zetteeh.net.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: Message signed with OpenPGP using GPGMail