0

I am struggling to delete a file in production mode.I have tried several options that are

1) File.delete(filename)

2) FileUtils.rm_rf(filename)

It says permission denied in production mode when i run in development it works fine.Also when i explicitly run chmod -R 777 on the folder where the file exists it lets me delete the file.I have tried with File.chmod option but it isn't working

1 Answers1

0

In production environment what is your user and what permissions he has. First check permission for that user than proceed further.

Sourabh Upadhyay
  • 1,034
  • 11
  • 31