This forum is no longer active. Please post your questions to our new community site
./manage.py permission denied
|
|
Hi, I’ve just installed the djangostack in mac osx Tiger. I cannot run any command with./manage.py. I’m trying to syncdb but keep getting permission denied error. I’ve thought making it executable by running the command: chmod +x django-admin.py from the bin file but still permission denied. can anyone help please? Thanks Tim |
|
|
Have you loaded the environment by executing the script named use_djangostack? |
|
|
yeah I started it up like this. $ cd /Applications/djangostack-1.0.2-0 started a project and an app, just can’t get the syncdb to work. |
|
|
Mmmm and what does the error say exactly? We are not Django developers, I am afraid that none of us knows exactly how to use syncdb :S |
|
|
./manage.py syncdb from the project directory produces this error: ./manage.py: Permission denied i’m a beginner myself, so slightly confused Thanks for your help |
|
|
And what are the permissions of the file? Who is the owner? Is it possible that you installed the stack as a different user? (I know this is basic and you have probably checked) |
|
|
Yeah i’m the owner, and the stack is installed under the same user profile. all can read and write. |
|
|
Damn, well, we had to try that one :) How can we reproduce this issue on our side? Remember, we know nothing about Django. Thanks in advance |
|
|
right well I’m using your Djangostack 1.0.2-0 on Mac OSX Tiger. I have started a project called Tim: $ django-admin.py starpproject Tim In the Tim Directory I have created an application called “Ticket” :$ django-admin.py startapp Ticket In the Ticket Directory I have put the following in the models.py file: from django.db import models TICKET_STATUS_CHOICES = ( (‘new’, ‘New’), (‘assigned’, ‘Assigned’), (‘reopened’, ‘Reopened’), (‘closed’, ‘Closed’), ) class Ticket(models.Model): assigned_to = models.ForeignKey(User, null=True, blank=True) status = models.Charfield(max_length=20, choices=TICKET_STATUS_CHOICES, default=’new’) description = models.Textfield() created_on = models.DateTimeField(‘date created’, auto_now_add=True) updated_on = models.DateTimeField(‘date updated’, auto_now=True)
Class TicketAdmin(admin.ModelAdmin): pass admin.site.register(Ticket, TicketAdmin) Back in the Tim Directory I try to run the ./manage.py syncdb to create the database but get the permission denied message. Thanks very much |
|
|
What database engine have you configured in settings.py? |
|
|
sqlite3 |
|
|
Hi, I have tested this on Linux, and it works for me. I’ll try OS X later. In the meanwhile, where is the database file that you are using, and what are the permissions of it, its folder, and all its parent folders? Does the database exist already? If not, can you try to use the touch command to create it in the place that is defined by settings.py? Thanks in advance |
|
|
Does manage.py have the necessary permissions? Have you tried calling the script with path_to_python/manage.py ? |
|
|
Cheers Ansem, yeh, how did I miss that!? Problem solved! |
|
|
Hehe, it usually happens. The more difficult issues tend to have the most simple solution. Glad to hear that it worked :) |

