2

I am trying to create a directory with 777 permissions on Mac.

I am using this but I cannot delete the directory with php:

File f = new File("/Applications/XAMPP/xamppfiles/htdocs/project/images/directoryName");
f.setWritable(true);
f.mkdir();

When I try to delete this directory I am getting this:

unlink(project/images/directoryName/subFile): Permission denied in 

I need to create folders and files on htdocs folder with my Java App and delete or edit them using php.

onivi
  • 1,348
  • 3
  • 17
  • 25

1 Answers1

1

try this:

Runtime.getRuntime().exec("chmod 777 /Applications/XAMPP/xamppfiles/htdocs/project/images/directoryName");
amone
  • 3,712
  • 10
  • 36
  • 53