Re: [PHP] upload permission denied!

2002-01-28 Thread sundogcurt

Like so?

error message :
Warning: Unable to create 'sdf.jpg': Permission denied in 
/home/gruesome/public_html/valeriemacwilliam/includes/content/addpic.php 
on line 21

code :
?
if($myfile){
if(copy(stripslashes($myfile), $newname . '.jpg')){
print pdone/p;
}else{
print pnot done/p;
}
}
?
h2 align=centerAdd Picture/h2
form action=?print $PHP_SELF? method=post 
enctype=multipart/form-data name=addpicform
input type=hidden name=action value=addpic
input type=hidden name=status value=0
input type=hidden name=sorder value=0
new file name input type=text name=newnamebr /
input type=hidden name=MAX_FILE_SIZE value=100
input name=myfile type=filebr /
input type=submit value=Send file
/form






[EMAIL PROTECTED] wrote:


At least give us the error you get.

And it sounds like I'd need to see your code too.

bvr.

On Mon, 28 Jan 2002 15:23:50 -0800, sundogcurt wrote:

I'm not sure if this is a problem I can overcome with PHP or if I have 
to go directly to the Linux box to fix (I hope not).

I have moved my development from a win32/apache/mysql box to a 
Mandrake/apache/mysqly box and have only one problem (that I know of) to 
overcome.

When I try to upload an image (with scripts that worked just fine on the 
win32 system) I get a permission denied error. The dir that I am trying 
to write to has permissions for everybody to do anything! (777 or 0777 
how ever you want to format it). The scripts are located in my user dir 
under public_html etc etc. I can create directories in there but I can't 
seem to convince the darn thing to copy an image. It seems to upload (no 
errors) but that is where it ends. I don't know what other information 
you need from me or if this is even the proper list to be submitting to.

Again I say I am able to create directories but not copy an image. ???

Thanks and I'm sorry that my question has anything to do with uploading 
stuff eheheh








Re: [PHP] upload permission denied!

2002-01-28 Thread Jason Wong

On Tuesday 29 January 2002 11:10, sundogcurt wrote:
 Like so?

 error message :
 Warning: Unable to create 'sdf.jpg': Permission denied in
 /home/gruesome/public_html/valeriemacwilliam/includes/content/addpic.php
 on line 21

 code :
 ?
 if($myfile){
 if(copy(stripslashes($myfile), $newname . '.jpg')){
 print pdone/p;
 }else{
 print pnot done/p;
 }
 }


[snip]


You need to change to the permissions of the directory in which you want to 
copy the file to, so that it's writable by the 'user' running the webserver.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Nobody can be exactly like me.  Sometimes even I have trouble doing it.
-- Tallulah Bankhead
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] upload permission denied!

2002-01-28 Thread sundogcurt

the directory permissions are set to 777 / 0777 any user, any group, 
etc. at least that is how I understand it. if i'm wrong please correct 
me, I do appreciate the help thank you.

[EMAIL PROTECTED] wrote:

On Tuesday 29 January 2002 11:10, sundogcurt wrote:

Like so?

error message :
Warning: Unable to create 'sdf.jpg': Permission denied in
/home/gruesome/public_html/valeriemacwilliam/includes/content/addpic.php
on line 21

code :
?
if($myfile){
if(copy(stripslashes($myfile), $newname . '.jpg')){
print pdone/p;
}else{
print pnot done/p;
}
}



[snip]


You need to change to the permissions of the directory in which you want to 
copy the file to, so that it's writable by the 'user' running the webserver.






Re: [PHP] upload permission denied!

2002-01-28 Thread Jason Wong

On Tuesday 29 January 2002 11:48, sundogcurt wrote:

 the directory permissions are set to 777 / 0777 any user, any group,
 etc. at least that is how I understand it. if i'm wrong please correct
 me, I do appreciate the help thank you.

If they're set to 777 then anybody can do anything to it which means it 
should be OK. The only thing is whether you have set the *correct* directory? 
According to your code, I believe the file will be copied to:

  /home/gruesome/public_html/valeriemacwilliam/includes/content/
  
Is this correct?


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If you have never been hated by your child, you have never been a parent.
-- Bette Davis
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] upload permission denied!

2002-01-28 Thread Girish Nath

Hi

For some reason i couldn't get the 777 thing to work on one of my hosts but
managed to get this syntax to work instead :

chmod o=rwx directoryname

***It's not exactly secure but might get the job done ***

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 3:55 AM
Subject: Re: [PHP] upload permission denied!


On Tuesday 29 January 2002 11:48, sundogcurt wrote:

 the directory permissions are set to 777 / 0777 any user, any group,
 etc. at least that is how I understand it. if i'm wrong please correct
 me, I do appreciate the help thank you.

If they're set to 777 then anybody can do anything to it which means it
should be OK. The only thing is whether you have set the *correct*
directory?
According to your code, I believe the file will be copied to:

  /home/gruesome/public_html/valeriemacwilliam/includes/content/

Is this correct?


--
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If you have never been hated by your child, you have never been a parent.
-- Bette Davis
*/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] upload permission denied!

2002-01-28 Thread sundogcurt

That is where the script is that uploads the file, the file should be 
going to  :

/home/gruesome/public_html/valeriemacwilliam/includes/content/

/home/gruesome/public_html/valeriemacwilliam/pics/
or /tmp/ or where ever I have tried a ton of different folders

[EMAIL PROTECTED] wrote:

On Tuesday 29 January 2002 11:48, sundogcurt wrote:

the directory permissions are set to 777 / 0777 any user, any group,
etc. at least that is how I understand it. if i'm wrong please correct
me, I do appreciate the help thank you.


If they're set to 777 then anybody can do anything to it which means it 
should be OK. The only thing is whether you have set the *correct* directory? 
According to your code, I believe the file will be copied to:

  /home/gruesome/public_html/valeriemacwilliam/includes/content/
  
Is this correct?






Re: [PHP] Upload --Permission denied simple error...

2001-02-27 Thread Richard Lynch

You need to be copying files to a directory that the user PHP runs as has
write-access to.

Windows NT file permissions are accessed by using right-click.

Other Windows versions, only Bill Gates knows.

--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
- Original Message -
From: Dhaval Desai [EMAIL PROTECTED]
Newsgroups: php.general
Sent: Saturday, February 24, 2001 1:31 AM
Subject: [PHP] Upload --Permission denied simple error...


 hi!


 I have fws simple lines:

 ?php
 if ($userfile) {
 copy($userfile, "C:\\");
 } else {
 echo "Possible file upload attack: filename
 '$userfile'.";
 }

 ?


 Warning: Unable to create 'C:\': Permission denied in
 c:\phpdev2\www\upload\action.php on line 3



 and I get this error..I tried coyping to D:\ too but
 the same error..



 Can u tell me what could be the problem possibly..

 Thank you
 Dhaval Desai

 __
 Do You Yahoo!?
 Get email at your own domain with Yahoo! Mail.
 http://personal.mail.yahoo.com/

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]