This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Delete folder e file FTP
#1
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.
Reply
#2
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.
Reply
#3
(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
Reply


Forum Jump: