M
murfitUK
Guest
Not sure if this is the correct place to post but I hope someone can help.
My website is hosted on a Plesk 7.6 Windows server and I am having trouble changing permissions to allow a script to delete or rename files.
I am building a website and a back-end admin page to allow me to upload .jpg files. The uploading part is fine - initially got an error message about not having permission to write the file but I was able to change permission by clicking a box in the control panel (although I think it was more by lucky guess than skill).
Problem now is that I am getting error messages when trying to delete files from the sever or rename them. This is a typical error:
Warning: rename(table.jpg,chart.jpg): Permission denied in C:\Inetpub\vhosts\murfituk.com\httpdocs\testarea\pictest\index.php on line 4
The script in this case is a simple php file:
<?php
$oldname="table.jpg";
$newname="chart.jpg";
rename($oldname, $newname);
?>
This index.php file and the jpg are in the same folder.
The same error happens if I use unlink($file)
I've had a look at the permissions for index.php and the folder pictest and have tried randomly clicking various options. There are lots of options to choose from and I'm getting nowhere fast.
Can anyone offer guidance as to what I need to look at to make this work?
My website is hosted on a Plesk 7.6 Windows server and I am having trouble changing permissions to allow a script to delete or rename files.
I am building a website and a back-end admin page to allow me to upload .jpg files. The uploading part is fine - initially got an error message about not having permission to write the file but I was able to change permission by clicking a box in the control panel (although I think it was more by lucky guess than skill).
Problem now is that I am getting error messages when trying to delete files from the sever or rename them. This is a typical error:
Warning: rename(table.jpg,chart.jpg): Permission denied in C:\Inetpub\vhosts\murfituk.com\httpdocs\testarea\pictest\index.php on line 4
The script in this case is a simple php file:
<?php
$oldname="table.jpg";
$newname="chart.jpg";
rename($oldname, $newname);
?>
This index.php file and the jpg are in the same folder.
The same error happens if I use unlink($file)
I've had a look at the permissions for index.php and the folder pictest and have tried randomly clicking various options. There are lots of options to choose from and I'm getting nowhere fast.
Can anyone offer guidance as to what I need to look at to make this work?