简体   繁体   中英

File delete rights in Linux

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM