0

I've just bought a VPS for testing purposes trying to learn how to use it etc.

I've setup apache/php and running a script which PHP creates folders. Ive tried setting the script to chmod it to 0755 but it still doesn't let me delete the folder.

I can't chown/chgrp as im not running the script as root.

I just need to be able to delete the folder with PHP, Is there a config file i can change so PHP creates folders with a different user group?

Thanks

Exoon
  • 1,513
  • 4
  • 20
  • 35

1 Answers1

0

Your folder is created by your script, that usually runs with the apache or web user. So you can't manipulate it as yourself (in an FTP for example).

What you can do is change the mode within your script (still running as apache or web user) like so:

<?php
chmod("/somedir/somefile", 0777);  // octal; correct value of mode
?>
Samuel
  • 2,106
  • 1
  • 17
  • 27