I have the following problem, I run a script on multiple servers that writes files on a single server.
Files are written with these rights:
-rw-r--r-- 1 someuser someuser 139 Apr 2 12:40 filename.jpg
What I would like to do would be to be able to delete this file via a php script that runs with www-data rights.
Is there a way to configure something so www-data is allowed to remove the above file?
Asked
Active
Viewed 78 times
0

Alex Flo
- 200
- 1
- 1
- 8
1 Answers
1
The php script run wiht user (euid): www-data and group (egid): www-data. One solution may be the following:
-rw-rw-r-- 1 someuser www-data 139 Apr 2 12:40 filename.jpg
In this situation, the php script could delete the file without problems.

Alfredo Pons Menargues
- 166
- 7
-
Thanks but this would require to change the files so that the generated files have different rights and that was something I tried to avoid :) It looks like I'd have to do it this way though. – Alex Flo May 27 '13 at 07:35