|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
PHP help needed, please.
hi can someone help me with what i would assume small php code fix. i'm trying to add a CHMOD & CHOWN function to my upload.php file. right now all images that are uploaded by the script is being set to CHMOD 600 with a GRP and USER of "99".
I can't ftp in to edit or delete images since it says i don't have permission. so can someone the chmod to 0644 with a GRP and USER of 'missbot' thanks in advance. file is here www.nemxproject.com/upload.txt |
|
|
|
|
|
#2 |
|
So Fucking Banned
Join Date: Aug 2003
Location: San Diego, CA
Posts: 5,464
|
http://us2.php.net/manual/en/function.chgrp.php
http://us2.php.net/manual/en/function.chmod.php http://us2.php.net/manual/en/function.chown.php php.net should be your next best friend. |
|
|
|
|
|
#3 |
|
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
yeah php.net is good. i just came from there. I guess i'm placing the function in the wrong place or somethign cause it was working. no errors were displayed yet the files still uploaded with a restricted chmod/grp/owner
|
|
|
|
|
|
#4 | |
|
Confirmed User
Join Date: Feb 2003
Location: Canby, OR
Posts: 7,453
|
Quote:
PHP Code:
jDoG
__________________
NSCash now powering ReelProfits.com ALSO FEATURING: NSCash.com :: SoloDollars.com :: ReelProfits.com :: BiminiBucks.com :: VOD PROGRAMS COMING SOON: Greedy Bucks :: Vengeance Cash NOW OFFERING OVER 60 SITES CONTACT :: JAMES SMITH :: CHIEF TECHNOLOGY OFFICER :: ICQ (711385133) |
|
|
|
|
|
|
#5 |
|
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 22,143
|
An uprivileged user cannot chown a file to another user.
As for deleting files, you have permission to delete them if they are in a directory you have write access to, regardless of the permission on the file itself. |
|
|
|
|
|
#6 | |
|
Confirmed User
Industry Role:
Join Date: Jul 2003
Location: couch
Posts: 6,258
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
hmm i still can't get the script to use the chmod i'm not receiving any errors. files are still being uploaded with 0600 chmod. anyone have any insight into why this is happening
|
|
|
|
|
|
#8 | |
|
Confirmed User
Join Date: Apr 2002
Location: Houston
Posts: 5,651
|
Quote:
|
|
|
|
|
|
|
#9 |
|
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
error reporting seems to be working cause I left out a semi-colon and the script displayed the line error
|
|
|
|
|
|
#10 | |
|
Confirmed User
Join Date: Apr 2002
Location: Houston
Posts: 5,651
|
Quote:
|
|
|
|
|
|
|
#11 |
|
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
how would i go about checking to see if my error reporting is on
|
|
|
|
|
|
#12 | |
|
Confirmed User
Industry Role:
Join Date: May 2002
Location: Toronto, Canada
Posts: 5,599
|
Quote:
Since this isnt a _root_ user you cannot chown the file to another user on the machine using the php script, about the best you could do is chmod 755, so that only the webserver user can write to the file but everyone else on the system can read/execute it. Right from Php.net/chown "Attempts to change the owner of the file filename to user user (specified by name or number). Only the superuser may change the owner of a file. " |
|
|
|
|
|
|
#13 | |
|
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
Quote:
|
|
|
|
|