简体   繁体   中英

php created files ownership

I am having a irritating problem concerning the permissions of files created by Wordpress.

When i download plugins using wordpress or uploading images, and even when a php script creates a dir/files it puts the permissions of this folder into a different user/group.

My user does has no access to this file/folder under my own ftp account.

Is there a way to change files/folders ownership created by apache/php/wordpress to my user ?

If you are using Ubuntu (I don't know if int other distros the files are in the same location) you can edit the file envvars located in /etc/apache2 and restart Apache.

If you can use ACL this is a better solution than changing the user for Apache, more info: https://help.ubuntu.com/community/FilePermissionsACLs

如果要从php脚本更改权限,可以使用chown()函数

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