I have migrated files from one directory to another with:
cp -rfpn "${OLD_WWW_DIR}/users/img/." "${NEW_WWW_DIR}/users/img"
However, when I want to rewrite image in PHP script (user updates its avatar via form), I got:
Warning: imagejpeg(/var/www/new_web/www/users/img/avatar_456.jpg): failed to open stream: Permission denied in "script name" on line "xy"
How to solve this and set rights correctly during copy?
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.