Delete Files via Backend

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
LANtastic
Posts: 73
Joined: Sun 22. Feb 2004, 13:11
Location: Germany

Delete Files via Backend

Post by LANtastic »

There seems to be a problem with the file-deletion.

If you upload a file via the backend and later delete that file, the following happens as far as I understood :

The entry in the mysql table is deleted, or better said : The flag for deleted is set.
The biggest problem :
All deleted files get new file permission, as soon as you delete them from the "Trash Folder" in the backend, instead of really being deleted from the server.
That would not be a problem, if this filepermission wouldn't be 660 :(
This means, that even the owner of such a file is not able to delete it via ftp

I had to phone with my Provider and he had to delete those files manually by using Server-Admin rights.

@Oliver :
Could you please modify those routines in a way, that files, I delete in the backend are physically deleted from server ?
THis would help to safe place on a domain and create less phone calls to server admins :D
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Do you mean this has changed in the newest version of 1.1-RC4_2004-08-27 ???

My installation of version 1.1-RC4_2004-06-22 does not change deleted files to get new file permission, once they are deleted from the "Trash Folder" in the backend. They remain at CHMOD 644.

There doesn't appear to be any place in the phpWCMS version 1.1-RC4_2004-06-22 code where CHMOD 660 is applied to any files.
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

and does this mean that you can't now..

Code: Select all

DELETE FROM `phpwcms_file` WHERE `f_trash` = '9';
??

as far as i thought: all the deletion was purly database issues therefore can not affect any CHMOD at all.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

pSouper wrote:as far as i thought: all the deletion was purly database issues therefore can not affect any CHMOD at all.
Actually, the files ~also~ remain in the folder "phpwcms_filestorage/1", as LANtastic describes, but I had no problem deleting them in my FTP client.
LANtastic
Posts: 73
Joined: Sun 22. Feb 2004, 13:11
Location: Germany

Post by LANtastic »

I havn't checked the code, if it does delete the file, but I know, that all files with permission 660 have been images I deleted in the backend.

In any case alle those files should be deleted physically to avoid wasting web space
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

There may be some future plans for thier total deletion, i wouldn't be surprised at all.
LANtastic
Posts: 73
Joined: Sun 22. Feb 2004, 13:11
Location: Germany

Post by LANtastic »

Maybe that deletion should be more than only file deletion.
Even alle DB Entries marked as deleted should be really eleminated instead of being marked as deleted.

Why keep Articles marked as deleted, if you arent able to delete them via backend. You can only delete everything by your own scripts.

So my request is :

- deleted articles should be recoverable as it's currently done for files inside "File-Managment"
- If a file is deleted it should be really deleted
- everything deleted in the backend-trashfolder should also be deleted from the database
Locked