Error 550 when deleting a directory via FTP

Asked

Viewed 945 times

1

I am using Filezilla. Follow the error when trying to delete a folder:

Answer: 550 Could not delete 33: Invalid argument

I followed a tutorial for uploading images, the difference is that I created a folder with the user id and inside it there are the images that he uploaded.

On FTP, I set the main image directory permission to 777

One should do something to set the creation of the folder as readable and deletable via code, right? The example code created on the server folders that cannot be deleted nor seen.

1 answer

1

Make sure that the user php is running is the same user you logged on to ftp. Use:

<?php
$userid = posix_geteuid();
$userInfo = posix_getpwuid($userid);
var_dump($userInfo);

If the user is different, it may occur that you could not delete because you do not own the folder, since it was created with php, then you need to log in with the user that php is running.

  • paste this code into php, what do I do now? came out an array with name, password, uid etc

  • checks if the user name of this array is the same user you are logging into ftp

Browser other questions tagged

You are not signed in. Login or sign up in order to post.