• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Removing Directories With Content In Them

S

Superman859

Guest
I want to remove directories that have content in them. I used to be able to do this using the file manager, but not it always gives me the error saying permission denied - cannot remove directory.

I realize I can use SSH and do it, but I will be setting up sites and domains for clients, who will not know Unix commands at all. They need to use the file manager.

How can I get it to simply delete the directory along with all contents after they click remove selected and confirm it?

Like I said, I believe it used to do this, but for some reason it won't anymore.

Here is a snippet of the error:

Error: Unable to remove file /httpdocs//var/www/vhosts/easy-membership.com/httpdocs/includes: filemng failed: rm: cannot remove directory `/var/www/vhosts/easy-membership.com/httpdocs/includes/adodb': Permission denied
rm: cannot remove `/var/www/vhosts/easy-membership.com/httpdocs/includes/agent_browser.php': Permission denied
rm: cannot remove `/var/www/vhosts/easy-membership.com/httpdocs/includes/agent_os.php': Permission denied

I'm logged in as administrator for Plesk.
 
Plesk File Manager works with privileges of the FTP user. So if you have directories and files, that belongs to other users, then File Manager have no enough privileges to remove such files.

I suppose you have copied that files under root privileges. If so, then only root user can remove them.
 
Yeah, have these folders just so happened to be copied by root?

If so, you need to setup the folder perms for this account properly. I'm pretty sure it is around 25 - 30 chown commands to fix this.

If you create domains in the future, you should not get this error in the file manager.
 
Hmm...is root for virtuozzo and admin for Plesk control panel different?

They were probably created with root via SSH. I know all directories were rwx for root, but nobody else had write permissions.

When logged into Plesk, it's always as admin, which gives me full control over all the domains. I guess admin is not the same as root, so I didn't have permissions.
 
admin for Plesk control panel is not a system user at all. This is user inside control panel only.

When you use filemanager in some domain, even if you do this under plesk admin, you still have domain's FTP user credentials, cause all filemanager's processes start under that FTP user.
 
Back
Top