简体   繁体   中英

Can not change permissions on FTP for files created with PHP copy

I have a script that uses the copy function of PHP to copy files to my server. When I log into my server via FTP I can't delete them anymore, as the permissions are set to 644. But when I try to change the permissions directly at the FTP, I get a "Operation not permitted" error.

NOOP
200 NOOP command successful
SITE CHMOD 777 /test2/2016-07-19/13739536_1750492681870132_416621053_n.jpg
550 CHMOD 777 /test2/2016-07-19/13739536_1750492681870132_416621053_n.jpg: Operation not permitted

Normally I can change the permissions on my server without any problems. Via SSH it is also not working. Does it have to do something with the permissions of the original file?

Thanks for your help!

PHP script is a different user than the one that is logging in through FTP.

Either change the permisions of the file using another php script or log in as root through SSH.

可能是提供的参数有误。通常应该可以正常工作

chmod("/test2/2016-07-19/13739536_1750492681870132_416621053_n.jpg",0777);

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