Gossamer Forum
Home : Products : DBMan : Customization :

File Upload - "unauthorized access"

Quote Reply
File Upload - "unauthorized access"
We have been using the file upload mod and thought everything was working fine - until recently we have been receiving email from alumni stating that when they try to upload a .jpg or .gif they receive the following error: "unauthorized access".

I thought that we had set this up to allow anyone to upload? We recently added the ext ".JPG" and ".GIF" (uppercase) thinking that maybe it might be a case sensitive problem.

However, it still works for some not others?

Since we are receiving an "unauthorized access" it has to be something with permissions. Does anyone have a clue as to what I should look for to what is causing this problem?

Thanks
---------------
donm
Quote Reply
Re: File Upload - "unauthorized access" In reply to
I think I might have found the problem -

In the file-upload.cgi there is the following code:

# If you want only those with admin permission to be able to upload files,
# set the following to
# unless ($per_admin) { $message = "You are not authorized to upload files"; &cgierr; exit;}

unless ($per_add) { $message = "You are not authorized to upload files"; &cgierr; exit;}

I want anyone to be able that has a record on file to be able to upload - however, once someone has successfully added a record the permissions are changed and "add" is removed from their permissions because we only want them to be able to add one record and no more. Once the record has been added the new default permissions are "per_mod"

If one chooses to upload a graphic after their permissions has changed so that they no longer have "add" permissions they no longer can upload a file.

So, I have changed the line in the file-upload.cgi to:

unless ($per_mod) { $message = "You are not authorized to upload files"; &cgierr; exit;}

Because everyone will have at least this permission even after adding a record. Do you think this might solve the upload problem?

--------------------
donm

Quote Reply
Re: File Upload - "unauthorized access" In reply to
That should work, donm.

Try it.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: File Upload - "unauthorized access" In reply to
Just a follow-up - changing it to per_mod works just fine !

Everyone is now able to upload without any problems except for exceeding upload limit - and that I want to leave the way it is !

Maybe this might help anyone else that might be having problems with the upload mod - check exactly who has permissions to upload in file-upload.cgi

-----------------
donm
Quote Reply
Re: File Upload - "unauthorized access" In reply to
Great! Good job!

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us