550 operation not permitted using FTP

I'm using FTP to manage some files on a site I run but keep seeing this (truncated) error log:

Command:    DELE calendarpermission.php
Response:   550 calendarpermission.php: Operation not permitted
[...]
Command:    DELE button_down.gif
Response:   550 button_down.gif: Operation not permitted
Command:    CWD /domains/example.com/public_html/admincp
Response:   250 CWD command successful
Command:    PWD
Response:   257 "/domains/example.com/public_html/admincp" is the current directory
Command:    RMD control_examples
Response:   550 control_examples: Operation not permitted
Command:    CWD /domains/example.com/public_html
Response:   250 CWD command successful
Command:    PWD
Response:   257 "/domains/example.com/public_html" is the current directory
Command:    RMD admincp
Response:   550 admincp: Operation not permitted
Status: Retrieving directory listing...
Command:    PASV
Response:   227 Entering Passive Mode (122,155,5,50,138,244).
Command:    MLSD
Response:   150 Opening ASCII mode data connection for MLSD
Response:   226 Transfer complete
Status: Directory listing successful
Status: Set permissions of '/domains/example.com/public_html/admincp' to '777'
Command:    SITE CHMOD 777 admincp
Response:   550 CHMOD 777 admincp: Operation not permitted

What do I do to solve this?


Solution 1:

If

Command:    SITE CHMOD 777 admincp
Response:   550 CHMOD 777 admincp: Operation not permitted

occurs then it means that you have absolutely no permissions to do that, you should resolve this problem with your hosting so that they can give your permissions; maybe that folder is has the purpose to stay?

Solution 2:

/domains/example.com/public_html/admincp may be owned by root. It may have been created by PHP and that would be why it is owned by root. Regardless, the user you logged into through ftp isn't allowed to modify the permissions of that file (or it doesn't exist).

Solution 3:

Command:    SITE CHMOD 777 admincp
Response:   550 CHMOD 777 admincp: Operation not permitted

Means that the the FTP user does not own the file/folder you're trying to chown. They may be in the same group and have full access to the file, but only the owner can chmod a file (or root/sudo). To resolve this you need to own the file (delete + recreate from backup not perserving owners/rights may work)