PHP permissions denied!

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

PHP permissions denied!

Postby mchi7lt2 on Tue Sep 23, 2008 8:01 pm

I have a PHP script running on LAMP to upload files (images) and I'm developing it on my Elyssa. The same script uploads files for me just fine on my WAMP and seems to go well on Elyssa but when it comes to clicking upload the Browser informs me I am "receiving directory insufficient permission" I have checked all the directorys from where I am saving to all the way up to 'file system' and they are all appropriately set to 755. HELP!
mchi7lt2
Level 1
Level 1
 
Posts: 7
Joined: Mon Aug 18, 2008 8:07 am

Linux Mint is funded by ads and donations.
 

Re: PHP permissions denied!

Postby Husse on Wed Sep 24, 2008 10:31 am

receiving directory insufficient permission

Is that the exact phrase?
Seems to be very odd English to me
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: PHP permissions denied!

Postby mchi7lt2 on Wed Sep 24, 2008 6:11 pm

sorry your right, this message is generated by some code:

<code>
@move_uploaded_file($_FILES[$fieldname]['tmp_name'], $uploadFilename)

or error('receiving directory insuffiecient permission', $uploadForm);
</code>

where "error" is a user-defined function for printing some simple diagnostic information. all it prints is:

"Upload failure
An error has occured: receiving directory insuffiecient permission... The upload form is reloading"
mchi7lt2
Level 1
Level 1
 
Posts: 7
Joined: Mon Aug 18, 2008 8:07 am

Re: PHP permissions denied!

Postby Husse on Thu Sep 25, 2008 5:30 am

The question is where are permissions insuffiecient?
On your uploading computer or on the server you upload to or is this a script on the server to make uploads?
You could try to be root very shortly and see what happens - not a second more than needed to test as being root on the internet is no good!
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: PHP permissions denied!

Postby mchi7lt2 on Thu Sep 25, 2008 9:34 am

ok have solved the problem, just went for brute force and chmod ed everythign with 777 and seems to work fine now.
mchi7lt2
Level 1
Level 1
 
Posts: 7
Joined: Mon Aug 18, 2008 8:07 am

Re: PHP permissions denied!

Postby Husse on Fri Sep 26, 2008 6:29 am

chmod ed everythign with 777

That sounds dangerous to me....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19710
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden


Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot] and 24 guests