List Info

Thread: FileField problem




FileField problem
user name
2006-05-31 16:57:16
Hi, everybody

I developed a little demo, which use FileField to upload
files, it
works well in django own server, then I manage to switch to
Apache +
mod_python, the admin module still looks ok, but when I use
the file
upload, the system says IOError, Permission denied. I have
modified the
upload folder to be writable for everyone. Any hints how to
solve this?
Thanks so much.

Following is the error message:

IOError at /autoest/rawfile/fasta/add/
[Errno 13] Permission denied: '/opt/demo/test.txt'
Request Method: 	POST
Request URL: 	http
://192.168.150.68/demo/testfile/txtfile/add/
Exception Type: 	IOError
Exception Value: 	[Errno 13] Permission denied:
'/opt/demo/test.txt'
Exception Location:
	/usr/lib/python2.4/site-packages/Django-0.91-py2.4.egg/djan
go/db/models/base.py
in _save_FIELD_file, line 325


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

FileField problem
user name
2006-05-31 17:26:13
On Wednesday 31 May 2006 09:57, mahakala wrote:
> when I use the file
> upload, the system says IOError, Permission denied. I
have modified the
> upload folder to be writable for everyone. Any hints
how to solve this?

> [Errno 13] Permission denied: '/opt/demo/test.txt'

Hi mahakala,

What is the output of:

ls -dal /opt /opt/demo

Eric.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

FileField problem
user name
2006-05-31 18:07:06
Hi, Eric,
it is

drwxrwxrwx 2 root root 4096 Jun  1 01:10 demo

and

drwxrwxrwx 2 root root 4096 Jun  1 01:10 opt

thks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

FileField problem
user name
2006-05-31 18:44:39
On Wednesday 31 May 2006 11:07, mahakala wrote:
> Hi, Eric,
> it is
>
> drwxrwxrwx 2 root root 4096 Jun  1 01:10 demo
>
> and
>
> drwxrwxrwx 2 root root 4096 Jun  1 01:10 opt
>
> thks.

Does /opt/demo/test.txt already exist?  If so, what are the
permissions on it?

I think what I'd try is:

Make /opt and /demo 755
chmod 755 /opt /opt/demo
> drwxr-xr-x 2 root root 4096 Jun  1 01:10 opt

Make demo and all its files owned by your Apache process
user (probably 
'apache').  You *did* say you were using
apache/mod_python, right?:
chown -R apache.apache /opt/demo

Good luck,

Eric.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

FileField problem
user name
2006-05-31 19:00:07
Hi, Eric
I just figure out what cause the problem, it relates to
fedora SELinux,
since this is just a demo runs in my vmware, I disable it,
and
everythins seems all right now. I will try to learn some
SELinux policy
to enforce it again. Thank you!

mahakala


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )