|
|
|
|
![]() ![]() |
Jan 26 2007, 10:22 PM
Post
#1
|
|
|
Super Member Group: [HOSTED] Posts: 533 Joined: 25-April 05 Member No.: 4,374 |
I have been using phpFormGenerator which is included in Fantastico under the cPanel. The script works OK but I have encountered another problem. When I send attachments they are stored on the server and I can’t delete them. The problem appears to be that phpFormGenerator creates the file with no owner.
CODE -rw-r--r-- 1 nobody nobody 420457 Dec 7 00:41 12_41_25_update.txt I have SSHed into the server and tried to delete them manually. CODE -jailshell-3.00$ rm 12_41_25_update.txt rm: remove write-protected regular file `12_41_25_update.txt'? y rm: cannot remove `12_41_25_update.txt': Permission denied I next tried to chmod the files CODE -jailshell-3.00$ chmod 777 12_41_25_update.txt chmod: changing permissions of `12_41_25_update.txt': Operation not permitted And last but not least I tried to take ownership CODE -jailshell-3.00$ chown ******* 12_41_25_update.txt chown: changing ownership of `12_41_25_update.txt': Operation not permitted Any suggestions? |
|
|
|
Jan 26 2007, 10:37 PM
Post
#2
|
|
|
Nenad Bozidarevic Group: [MODERATOR] Posts: 1,013 Joined: 7-November 05 From: Belgrade, Serbia Member No.: 9,500 |
You might want to take a look at this discussion, since the topic started had a similar problem. The solution can be found here, thanks to vujsa.
|
|
|
|
Jan 27 2007, 02:39 AM
Post
#3
|
|
|
Super Member Group: [HOSTED] Posts: 763 Joined: 8-April 06 From: Lima - Peru Member No.: 12,579 |
Some months ago i have the same trouble with phpFormGenerator and with phpGenie at other sites i mantain and never found the solution, so, all the problematic files and directories remain at that servers, i jUst read the solution and try the cleanup script, it seems to work but nothing happens and also the script dont show anything.
It is very strange, because in one of the servers with trouble i can chmod 777 the directory but i cant delete it after that. Best regards, |
|
|
|
Jan 27 2007, 05:39 AM
Post
#4
|
|
|
Colonel Panic Group: [MODERATOR] Posts: 2,793 Joined: 25-March 05 From: Toronto, Ontario, Canada Member No.: 3,233 |
I thought SSH was disabled at Astahost
xboxrulz |
|
|
|
Jan 28 2007, 01:49 AM
Post
#5
|
|
|
Absolute Newbie Group: Admin Posts: 888 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 |
Some months ago i have the same trouble with phpFormGenerator and with phpGenie at other sites i mantain and never found the solution, so, all the problematic files and directories remain at that servers, i jUst read the solution and try the cleanup script, it seems to work but nothing happens and also the script dont show anything. It is very strange, because in one of the servers with trouble i can chmod 777 the directory but i cant delete it after that. Best regards, The path must be correct! /home/username/public_html/directory/file.txt As for the directory that you can chmod to 777 but can't delete, you have to have write permission in the parent directory as well so chmod the parent to 777 as well. SSH isn't disabled, just not offered. It has been found that shell access is far more trouble to deal with than it is worth! Anyhow, if you really want to chown a file or directory, you have to write a script to do it in the file system. Since the server owns the entity, only the server can change the owner of that entity! The server only performs tasks when it is directed to do so by a script. But if you write a script and it is wrong, then the file could be owned someone other than you ar or the server and then there isn't any possibility of changing it again without an system admin to help.This would be so much easier if everything use FTP instead of the file system! vujsa |
|
|
|
Jan 29 2007, 07:44 AM
Post
#6
|
|
|
Guilty Until Proven Innocent Group: Members Posts: 372 Joined: 13-April 05 Member No.: 3,937 |
Some months ago i have the same trouble with phpFormGenerator and with phpGenie at other sites i mantain and never found the solution, so, all the problematic files and directories remain at that servers, i jUst read the solution and try the cleanup script, it seems to work but nothing happens and also the script dont show anything. It is very strange, because in one of the servers with trouble i can chmod 777 the directory but i cant delete it after that. Best regards, i solved that by using a filemanager i installed.. of course you need to make it secure.. the control panel file manager belongs to cpanel user, i guess.. and it cannot erase that rouge file. using a filemanager you have installed means that you are telling apache to clean itself up.. since it is apache that put it there.. it is also owned by apache. it worked on my side.. --- this situation also occured in the paid hostings.. aside from the ftp rouge temp file when i get those random ftp timeouts. it is bother some but i think it is ok.. i already have a use for this "feature" |
|
|
|
Jan 29 2007, 04:07 PM
Post
#7
|
|
|
Super Member Group: [HOSTED] Posts: 533 Joined: 25-April 05 Member No.: 4,374 |
Cleanup.php worked the first time. I have already deleted the file but the original post mentioned leaving it there but password protected. How would one go about doing this?
|
|
|
|
Jan 29 2007, 10:18 PM
Post
#8
|
|
|
Absolute Newbie Group: Admin Posts: 888 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 |
Cleanup.php worked the first time. I have already deleted the file but the original post mentioned leaving it there but password protected. How would one go about doing this? Well, the easiest way to password protect a directory is to use the Web Protect feature in cPanel. Just goto cPanel > Site Management > Web Protect and select the directory that you want to protect. the directories are a little tricky to navigate in this program but you'll get the hang of it. It is like the filemanager where clicking the folder icon will take you into the folder but the folder name will select that folder. Generally speaking, any folder inside of a protected folder will require the same password to enter. You can add multiple users to this folder and ech folder can have a different password and/or user. It is possible to do all of this manually but if you don't get it right, there could be a hole in your security. With a script, you could even use this as your primary means of user management in restriccted areas but that usually isn't done anymore. For more information, look into password protection using .htaccess and .htpasswd. Keep in mind that this only restricts http acces to the folder. FTP access is not restricted so it is possible for someone to access your ftp account and either remove the restriction or move your sensitive script to a non-restricted folder for their use. vujsa |
|
|
|
Jan 31 2007, 08:08 AM
Post
#9
|
|
|
Super Member Group: [HOSTED] Posts: 763 Joined: 8-April 06 From: Lima - Peru Member No.: 12,579 |
i solved that by using a filemanager i installed.. of course you need to make it secure.. the control panel file manager belongs to cpanel user, i guess.. and it cannot erase that rouge file. using a filemanager you have installed means that you are telling apache to clean itself up.. since it is apache that put it there.. it is also owned by apache. it worked on my side.. --- this situation also occured in the paid hostings.. aside from the ftp rouge temp file when i get those random ftp timeouts. it is bother some but i think it is ok.. i already have a use for this "feature" Following your suggestion i install a filemanager and finally i could solve the problem and be able to delete all the problematic directories and files. The reason i could not be able to do it before was because the ftp program that i use don't show some htaccess files that were left behind, i dont know why it happens because with this same ftp program i can see this files in other sites. Best regards, |
|
|
|
Feb 1 2007, 10:23 PM
Post
#10
|
|
|
Guilty Until Proven Innocent Group: Members Posts: 372 Joined: 13-April 05 Member No.: 3,937 |
nice to know that it helped.. =)
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 13th October 2008 - 12:14 AM |