Skip to content

How can I delete files from cache dir as ordinary user? #115

@StefanGlaesser

Description

@StefanGlaesser

The cache directory is owned by www-data:www-data and has initial rights of 0777. Each subfolder has rights of 0755 and is also owned by www-data:www-data. I have an ordinary user which also belongs to the www-data group, but I'm not able to delete files from that directory. So I have the following situation:

$ ls -al
total 32
drwxr-xr-x 2 www-data www-data  4096 Apr 11 19:09 .
drwxr-xr-x 3 www-data www-data  4096 Apr 11 19:09 ..
-rw-r--r-- 1 www-data www-data 20817 Apr 11 19:09 48775fdc58830aef06bf75353c3bae8041df60a8.jpg

So when trying to delete those file I got:

$ rm 48775fdc58830aef06bf75353c3bae8041df60a8.jpg 
rm: remove write-protected regular file '48775fdc58830aef06bf75353c3bae8041df60a8.jpg'? y
rm: cannot remove '48775fdc58830aef06bf75353c3bae8041df60a8.jpg': Permission denied

So how can I setup the cache_directory that I can remove those files? I have some commands which are run by the ordinary user but those commands break down because some files of the image_cache directory can't be deleted/refreshed.

Best regards,
Stefan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions