Cannot delete a subscription: Unable to unlink directory entry .filename: Operation not permitted

Created:

2017-03-22 11:52:05 UTC

Modified:

2017-08-08 13:44:06 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Cannot delete a subscription: Unable to unlink directory entry .filename: Operation not permitted

Applicable to:

  • Plesk for Linux

Symptoms

After deleting a subscription, its files and DNS zone are still present, and now the files in /var/www/vhosts/example.com/ have incorrect owner.

The following errors can be found in /var/log/plesk/panel.log :

[2017-03-20 00:20:53] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/vhostmng-structure'] with exit code [1]
[2017-03-20 00:20:53] ERR [1] '/usr/local/psa/admin/bin/vhostmng-structure' failed with code 1.
stdout:
Unable to remove dir /subdomains/directory/httpdocs: Permission denied
System error 13: Permission denied
stderr:
Unable to remove dir /subdomains/directory/httpdocs: Permission denied
System error 13: Permission denied
[2017-03-20 00:20:53] ERR [util_exec] proc_close() failed ['/usr/local/psa/admin/bin/usermng' '--del-user' '--user=username' '--homedir=/var/www/vhosts/example.com'] with exit code [1]
[2017-03-20 00:20:53] ERR [1] '/usr/local/psa/admin/bin/usermng' '--del-user' '--user=username' '--homedir=/var/www/vhosts/example.com' failed with code 1.
stdout:
usermng: Unable to unlink directory entry .htaccess: Operation not permitted
System error 1: Operation not permitted
stderr:

The immutable flag is set to one of the files:

[root@server httpdocs]# lsattr /var/www/vhosts/example.com/httpdocs/.htaccess
----i--------e- /var/www/vhosts/example.com/httpdocs/.htaccess

Cause

The immutable flag prevents the directory from being deleted.

Resolution

Remove the immutable flag for the file mentioned in the error message:

# chattr -i /var/www/vhosts/example.com/httpdocs/.htaccess

Have more questions? Submit a request
Please sign in to leave a comment.