Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
September 02, 2014, 08:46:16 PM

Pages: [1]   Go Down
  Print  
Author Topic: Help deleting files  (Read 42840 times)
larrycook99
Newbie
*
Offline Offline

Posts: 3


« on: October 22, 2010, 08:55:24 AM »

I have looked thru the forum and in the FAQs and have not found a solution to my problem of deleting files in using File Manager.

I created a Drupal install and played around a bit with it in order to learn how to use it. Now I want to start clean. So I deleted it using WebApp and noticed that not all of the drupal tree had been deleted. So I went into File Manager and walked to the bottom of the tree and found two php files that were not deleted, settings.php and default.settings.php. After scrounging to find a way to change the permissions, I used FileZilla to change them to 777 and tried to delete them to no avail. So how do I delete these files and the related directories? When I look at the permissions in FileZilla they have the same owner/group id as all of my other files. So I am at a bit of a loss as what to do. For now I have renamed the drupal tree to drupalxxx so that I can go ahead and reinstall a clean drupal tree but I do want to get rid of these useless files/directories.
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5871



« Reply #1 on: October 22, 2010, 12:44:51 PM »

Were the settings files read-only (e.g., 444 permissions)? If so, you won't be able to erase them until you change them to at least 644. Many hosting services configure their servers to ignore "chmod" requests from browsers -- I don't know if LP does that, but if they do, you'll have to go into the control panel to change permissions. Did you check the actual permissions after trying to change them in FileZilla? They probably weren't changed. If they were, suPHP may have denied you access to "world writable" files (666 or 777, they're a security hazard). There's no reason to make an ordinary file 777. 644 would have done the trick.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
larrycook99
Newbie
*
Offline Offline

Posts: 3


« Reply #2 on: October 22, 2010, 01:23:53 PM »

When I first tried to delete these files, one of the files was 644 and the other was 444 and I could not delete either, which is to be expected of 444. So, I, just on a whim, decided to set them both to 777 and see if that made a difference. It didn't and I didn't expect it to since, as you said, 644 should have worked.

As to your question about whether FileZilla really was allowed to change the permissions, the changes were seen by the LPCP FileManager.

Also you say something about going into the control panel to change the permissions but I could not find such a place in LPCP. I have another site that uses cPanel and I know you can change file permissions there.

So I am left with, there is something else preventing me from deleting these particular files, but I have no idea what that might be.
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5871



« Reply #3 on: October 22, 2010, 02:44:56 PM »

You were unable to delete a 644 file? Very odd. If you were successful in changing both to 777 (whether by FileZilla or LPCP), try changing them to 644 and try deleting again. Confirm that the permissions changed before doing a deletion. You should be able to, if you are listed as the owner (if you can change permissions, presumably you are the owner). There might be something that locks you out of operations on a world-writable file (666 or 777). I find it difficult to believe that LPCP's file manager doesn't give you a way to change file permissions -- that's one of the most basic operations that you'd want to do. I have cPanel, so I can't give you specific instructions.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
larrycook99
Newbie
*
Offline Offline

Posts: 3


« Reply #4 on: October 29, 2010, 11:14:11 AM »

I figured it out. Although the files had 644 permissions, the directory they were in had permissions set to 555. Once I realized that, I changed it to 644 and all was as it should be. I didn't even think about that until I let it sit for a week and then came back to it today. Then it was obvious what was wrong.

As for LPCP's ability/inability to modify permissions, the only tool it has is a function called "Fix Disk Permissions" which performs the following function:

Once you click the button labeled "Fix Permissions", the tool will reset your permissions to the way they should be. This means that folders will be reset to the permission level 755 and the PHP files in your account (files that end with the .php extension) will be reset to the permission level 644.

So in theory I can change any file to 644 by renaming the file, which LPCP lets you do, using Fix Permissions and then naming it back. Not exactly optimal and you can't change permissions to anything else. So, I guess I'll continue to use FileZilla.

Thanks for the assistance.
« Last Edit: October 29, 2010, 11:21:21 AM by larrycook99 » Logged
katrina1
Guest
« Reply #5 on: October 30, 2010, 12:37:08 AM »

To change permissions in LPCP File Manager, click on the permissions on the right side which should then let you change them.
Logged
Peter
Newbie
*
Offline Offline

Posts: 2


« Reply #6 on: November 06, 2010, 11:02:21 AM »

I have a similar problem. 
I can change the permissions of files using cpanel and delete them, but they just come back again because the 'directory permissions' actually won't allow me to do this.
How do I change the 'directory permissions' using cpanel? 
I want to remove an entire directory.
I have searched the forums and fiddled around for too long now....please help me.

sincerely
peter
Logged
Peter
Newbie
*
Offline Offline

Posts: 2


« Reply #7 on: November 06, 2010, 11:08:57 AM »

After all of that, I just found it.  Now I feel like an idiot

The directory permissions are located in the same place as the file permissions and changed in exactly the same way.......

I hope this blunder is of use to someone.
Logged
seeder
Guest
« Reply #8 on: April 25, 2011, 10:35:24 PM »

I need an application that deletes files and folders/subfolders older than X number of days. I have posted about this before and I received responses leading me to scripts that don't appear to work the way I am describing here.
Logged
MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5871



« Reply #9 on: December 30, 2011, 09:23:29 AM »

I need an application that deletes files and folders/subfolders older than X number of days. I have posted about this before and I received responses leading me to scripts that don't appear to work the way I am describing here.

Code:
find . -mtime +X -print |xargs rm -rf
is one way to do it (I prefer to pipe to xargs rather than go through the funny "find" syntax to do a rm there). A command like this can be quite deadly, so test it out first (skip the |xargs...) to see what it will operate on. That is X or more days since the last modification of the file, so you may need to add 1 to X.

If you want to do this on a regular basis, or don't have shell access (SSH), do it in a "cron" job.
Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
jasonthomas661
Newbie
*
Offline Offline

Posts: 1


« Reply #10 on: February 12, 2013, 08:35:34 AM »

To improve permissions in LPCP Register Manager, mouse click on the permissions in the ideal side that should then allow you to change them.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: