LogicMachine Forum
Delete folder e file FTP - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Delete folder e file FTP (/showthread.php?tid=6149)



Delete folder e file FTP - linux_sun - 10.10.2025

Thanks, I solved it with another script to change the permissions.


Hi, I used a script to create a daily file called 2025-04-25.csv in a LM folder called userdata/2025-04, userdata/2025-05, userdata/2025-06, etc. The script assigned the following permissions to the folders and files: drwxr-xr-x, so I can't delete them via FTP. How can I do this? Thanks.


RE: Delete folder e file FTP - admin - 13.10.2025

Run this to set correct file/directory ownership:
Code:
os.execute('chown -R ftp:ftp /home/ftp')

You should run this code after creating any new files in ftp directory via scripts.


RE: Delete folder e file FTP - linux_sun - 15.10.2025

(13.10.2025, 06:57)admin Wrote: Run this to set correct file/directory ownership:
Code:
os.execute('chown -R ftp:ftp /home/ftp')

You should run this code after creating any new files in ftp directory via scripts.

Thanks admin