Lenny Davila wrote:
> I have a script that uploads and resizes an image and puts it in a users
> directory
> While testing I had to delete a few images.  I could not delete them by FTP
> or in my plesk control panel.  Only through using winSCP and logging on as
> root into the server.   Why is this happening?  I have even  tried to chmod
> the file by using this code after the image copy:
> chmod($new_image_name, 0777);
> PHP safe mode is on

Hey Lenny,

hate when that happens :)

You can't chmod from PHP because of safe mode.

When safe mode is enabled, PHP checks whether the files or directories 
you are about to operate on have the same UID (owner) as the script that 
is being executed. In addition, you cannot set the SUID, SGID and sticky 
bits.

I think there is an apache configuration setting because my own server 
does not have this problem but I can't remember what I configured to get 
this to work ..... it is almost 1:00 in the morning where I am, I will 
try to find the setting for you tomorrow (later today) if you have not 
found a solution. The URL below may help....

http://php.net/chmod

Reply via email to