![]() |
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 |
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. |
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
|
Quote:
PHP Code:
jDoG |
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. |
Quote:
|
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
|
Quote:
|
error reporting seems to be working cause I left out a semi-colon and the script displayed the line error
|
Quote:
|
how would i go about checking to see if my error reporting is on
|
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. " |
Quote:
|
| All times are GMT -7. The time now is 08:32 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123