开发者

python delete function not working in apache

I am using the s3cmd linux utility to delete files from our amazon s3 bucket. I have created a function in python which calls the s3cmd command line utility and开发者_运维问答 access and deletes the files amazon s3 bucket.

command= 's3cmd -c .s3cfg del s3://project-bucket/images/testimage.jpg'
os.system(command)

When I run the project through django development server, it works fine. The image is deleted.

But if I run on apache it does not work. The image is not deleted. I checked the apache error logs, they are no errors in the apache log. Please help.


Make sure the apache user has permission to write for all the images and folders you are deleting from.


the issue is resolved. gave 777 permissions to the .s3cfg file and now i am able to list the image as well as delete the image.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜