简体   繁体   中英

Debian PHP file permissions after extract zip archive

I have a Debian server which I use for php. I have the directory /var/www where my php files are stored.

the whole directory and all files belongs to ftpuser:internetuser. Every file in this directory have the permission 664.

Now there is a .zip archive with the permission 664 too. If I run the php script to extract the archive, all extracted files have the permission 644 and belong to www-data:internetuser.

What is the best way to get my files extracted with the permission 664?

Thanks in advance!

I solved my issue, by adding:

umask(0002);

before the extract command to my PHP extract script.

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