views:

23

answers:

2

i am using the s3cmd linux utility to deletes 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 does get deleted.

but if i run on apache it does not work. the image does not get deleted. i checked the apache error logs, they are no errors in the apache log. please help.

A: 

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

Xzhsh
i am using ubuntu 10.04 and checked in my /etc/apache2/envvars, its mentioned as:export APACHE_RUN_USER=www-dataexport APACHE_RUN_GROUP=www-datachecked the permission on amazon bucket, the file has full permissions for owner and read permission for everyone.
Suhail
once again, right now, i tried by giving full permissions to everyone, but still it does not get deleted.
Suhail
A: 

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.

Suhail