Can't delete a folder from DirectAdmin or FTP

Status
Not open for further replies.

buyer262000

New member
Joined
May 8, 2004
Messages
3
InstallHi,

I've got my first real webspace. I have not been doing anything with it except trying out various scripts. On the previous scripts I've tried, when I'm done with them I simply go into directadmin and delete the folder I installed or placed the script in then went to SQL admin and deleted the database if it had one.

This time, I tried a script called phpWebsite. It used a netbased installer, and I tooled around with it and actually decided to place this one in my public_html directory to make it my default index page. So I deleted the database and the folder I installed the script in with DirectAdmin.

Problem is, I can't delete the folder that it was in. I noticed there are a few file in there that now have the GID of "apache" rather than my username. I can't delete, chmod, etc these files. It says:


quote:

--------------------------------------------------------------------------------
Unable to delete /domains/totallibra.com/public_html/ws/images/photoalbum/1/22.jpg. Write access to the directory containing /domains/totallibra.com/public_html/ws/images/photoalbum/1/22.jpg is not allowed for the process's effective uid, or one of the directories in pathname did not allow search (execute) permission.

Unable to delete /domains/totallibra.com/public_html/ws/images/photoalbum/1/22_tn.jpg. Write access to the directory containing /domains/totallibra.com/public_html/ws/images/photoalbum/1/22_tn.jpg is not allowed for the process's effective uid, or one of the directories in pathname did not allow search (execute) permission.
--------------------------------------------------------------------------------



When I try to delete the folder these files are in (images or ws) I get this:


--------------------------------------------------------------------------------
Unable to delete directory /domains/totallibra.com/public_html/ws/images/photoalbum/1. Write access to the directory containing pathname was not allowed for the process's effective uid, or one of the directories in pathname did not allow search (execute) permission.
--------------------------------------------------------------------------------

I've tried over a dozen scripts and this is the first time I could not delete a folder or data when I was done. Can someone help?
 
You should be able to delete those files using SSH or Telnet.
Have you tried that yet?

The comand to delete the folder and all of it's content is

Code:
rm -rf foldername
If you are completely new to using SSH let me know and I will give you some other command that will help you find the folder you need to delete.

Be careful because you won't get a prompt asking if you are sure you want to delete the files or not.

I recomend you use SSH and not Telnet for security.
A good free SSH program is called Putty, and you can download it here.

Putty

-Jason
 
Last edited:
Ok, I only have access via Directadmin or ftp. There is explicitly no SSH acces allowed. What do I do in those contexts. . .?


jdlitson said:
You should be able to delete those files using SSH or Telnet.
Have you tried that yet?

The comand to delete the folder and all of it's content is

Code:
rm -rf

I recomend you use SSH and not Telnet for security.
A good free SSH program is called Putty, and you can download it here.

Putty

-Jason
 
Well if that is the case, then just ask you hosting provider to do it for you. That should not be a problem.

-Jason
 
Any thought that you can give me as to why this happened in the first place? All the other scripts that I've used allowed me to delete the folders when I was done. How on earth did the GID change from my username to "Apache"? (I'm assuming that is what is preventing me from deleting it. . .)

I don't want to have to bug my hosting company everytime I can't delete a folder. . .

Thanks for any insight. . .

jdlitson said:
Well if that is the case, then just ask you hosting provider to do it for you. That should not be a problem.

-Jason
 
Any thought that you can give me as to why this happened in the first place?

Reasone perhaps? The script called phpWebsiteuses a netbased installer. I am thinking that the installer had the GID of Apache when it was installed? I don't think it was changed on your server, but I am not sure.

Hey, bug your host. That is what hosing company's are here for.
I own a hosting company and want my customers to come to me when they are having problems. I understand them not wanting to give SSH access, for security purposes and so that inexperienced users don't mess up thier own site. I am sure they will be more than happy to help. Believe me you are not bugging them. Most people are in this business because they love it.

Good luck -Jason :D
 
this is a problem with the script not DA. you should really contact your host and get them to either delete the folder or change the ownership and permission of the folder and all its content.
 
vod said:
this is a problem with the script not DA. you should really contact your host and get them to either delete the folder or change the ownership and permission of the folder and all its content.

Nigel,

Does changing the ownership and permissions of all my domains affect any security problems that my server provider could hold against your proposal?

Tomas

By helping others you help your self
 
Does changing the ownership and permissions of all my domains affect any security problems that my server provider could hold against your proposal?
i dont really get you by "all domain"

From what i understand, you want to delete a particular folder yet it is not owned by you and you dont have write permission to that folder. You dont have ssh access so you cant login as root to change ownership and permission. I do not know whether that folder is safe to be deleted as i do not know what folder it is and what its content.

DA use several different ownership and file permission to maintain security and its operational. for example, each domain is owned by its user and can only be accessed by the user and root, etc.

I myself do not use phpwebsite, and i dont use DA file manager too. However if the folder you are talking about reside in /home/yourusername/any folder/ it should be owned by you. you can safely get them to change it.

good luck
 
Hmm, i missed your first post.

Unable to delete /domains/totallibra.com/public_html/ws/images/photoalbum/1/22.jpg. Write access to the directory containing /domains/totallibra.com/public_html/ws/images/photoalbum/1/22.jpg is not allowed for the process's effective uid, or one of the directories in pathname did not allow search (execute) permission.

if you are the owner/user of tallibra.com, then all files and folders under /home/totallibra/ should be owned by you. You can safely get them to change the ownership and ftp to alter the permission of the file you want to delete on your own.
 
Nigel,

My host provider came back to me saying that it is Installatron or/and that script involved with Installatron which make a mess about authoritues and ownership.

He proposed me to use any FTP-client in order to delete catalogues and files. But I use Ipswitch WS_FTP Professional, without succeeding deleting.

Tomas
 
Hi,

So you installed the script using installatron? then i think you probably can uninstall it thorugh installatron too. i have no experience with installatron though.

anyway if you cant uninstall through installatron then maybe this can help you.

do you want to delete the whole folder? or you actually have specific files that you want to delete?

if you have specific files that you want to delete, list those files to your host and tell them to change the ownership of the folder and those files to yourusername:yourusername. then you should be able to use wsftp, access the folder, right click each of the file one by one, click property, and tick write, click ok. then you should be able to delete those files.

If you want to delete the whole folder and you are sure that the whole folder's contents are safe to be deleted. its the same, tell your host you want to change the ownership of that folder and all of its content to yourusername:yourusername. login using wsftp, right click that folder, tick write, click ok. then right click that folder again and choose delete. it may take some time if there are many files inside.

btw, just curious, who is your hsting provider?
 
Last edited:
vod said:
Hi,

So you installed the script using installatron? then i think you probably can uninstall it thorugh installatron too. i have no experience with installatron though.....
..........btw, just curious, who is your hsting provider?

Well – I installed WordPress 2.0 within Installatron, but failed trying to uninstall, without going in to why I needed to uninstall.

After the failure uninstalling, I was presented this error message in Installatron:

An error has occured. Please check Installatron's error_log. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /usr/local/directadmin/plugins/iTron/sources/misc.php on line 500

My host provider is a – by Swedish media - highly recommended host provider: Aleborg Solution AB

Cheers / Tomas
 
Tomas said:
My host provider came back to me saying that it is Installatron or/and that script involved with Installatron which make a mess about authoritues and ownership.
Your provider is wrong, but even if he's right, it's your host that provided Installatron, not you, so it's still your host's responsibility.

The script is running has httpd, and therefore any file it creates or writes will be owned by httpd. The httpd daemon doesn't have enough rights to change ownership, and frankly, that's a good thing.
He proposed me to use any FTP-client in order to delete catalogues and files. But I use Ipswitch WS_FTP Professional, without succeeding deleting.
It doesn't matter what you use, you're not root, and your host isn't going to let you become root, so only your host can make the changes. If he's not willing to make the changes then you're probably at the wrong hosting company.

Jeff
 
Tomas said:
An error has occured. Please check Installatron's error_log. Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /usr/local/directadmin/plugins/iTron/sources/misc.php on line 500
This could be a bug (or perhaps only a limitation) in Installatron; you can certainly contact them yourself if you want to, but they can't resolve it on your host's system unless your host is willing to get involved.
My host provider is a – by Swedish media - highly recommended host provider: Aleborg Solution AB
I don't know anything about them, but if their response and behavior is as you write, then they're probably not going to be highly regarded by you once you understand the real problem.

So you have to decide if you want to live with the limitation they've imposed on you or not. There are many hosting providers out there (probably most of them) who will gladly help you with a problem with Installatron.

Jeff
 
I really think my host provider is doing what he can in order to help, and has offer his help deleting catalogues and files, but that’s not an effective customer solution to this problems.

Essential advantage with the idea in DirectAdmin - in a customer point of view - are lost if you have to lean on your host provider deleting catalogues and files.

I noticed by the way that my host provider (represented by Goran Tornqvist) has had these problems up on the board at Liquenox Forums in middle of December last year:

But - from that discussion I can’t say if the problem was presumed to be within Installatron, DirectAdmin or both of them. What so ever it’s obvious that the problem persist.

Of course - from my point of view as a web hotel customer - the effective ways of addressing the problem as I can see it – without being a programmer - is that the teams behind DirectAdmin and Installatron start talking and solve the problems end users like me are facing. Otherwise is – still from my point of view as a customer – not professional in view of that both teams are addressing a market. It is a effective way of destroying a good reputation in the market to handle customers

About my host provider and the high ranking in computer magazines in Sweden in combination with an increased numbers of agencies , probably has lead to an increased customer stock, which in the recent months has affected my host provider’s service team’s possibility to provide instant help and degree of service. It is a delicate matter of any serious service industry to balance an increased market approach with domestic backup teams at home. They have to ask themselves and figurate out a suitable mix of degree of service capacity and price for their service, regardless of which level of marked – or market niche they focus on.

Tomas
 
Last edited:
The problem is not with DirectAdmin. The problem is not with Installatron.

Installatron just allows you to install software; it doesn't modify the software in any way.

DirectAdmin simply runs apache (the httpd daemon), which runs php.

Unless you run httpd as root (and no, you can't), it can't change the ownership of a directory, since only root can do that.

And when php runs through apache, it runs as the apache user.

So the directories and files are created as the apache user.

We resolve the problem this way:

We run a crontab (as root) every ten minutes, to chmod the directories and contents, to the username, for each user who requests it, for each website they request it for. I imagine we could run it every minute without impacting the server, but ten minutes works for us.

Here's an example line:
Code:
*/10 * * * * chown -R example:example /home/example/domains/example.com/public_html/*

Yes, a bit of work, but since we're happy to keep our clients, we do it for them.

As I wrote, I know nothing about your hosting company, but if they want to keep your business they need to realize it's no-one's fault, and just do what they have to do to fix it.

Jeff
 
I don't really think I should post a 6-1/2 year old workaround for a problem that's now best solved by running PHP as CGI, or mod_ruid2. Search these forums for newer solutions. We use mod_ruid2, and I personally feel that's the solution for the future. In fact I've just closed this thread.

Jeff
 
Status
Not open for further replies.
Back
Top