Check if the policy allows unrestricted CIFS access:
Copy
Ask AI
if 'CIFS' in bucket_policy['Policy']: # Remove the CIFS permission new_policy = bucket_policy['Policy'].replace('CIFS', '') # Update the bucket policy s3.put_bucket_policy(Bucket='your-bucket-name', Policy=new_policy)
If the policy allows unrestricted CIFS access, remove the CIFS permission from the policy: