Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot delete or edit filename or folder name. #2040

Closed
Jeffery4000 opened this issue Jun 7, 2017 · 18 comments
Closed

Cannot delete or edit filename or folder name. #2040

Jeffery4000 opened this issue Jun 7, 2017 · 18 comments
Assignees

Comments

@Jeffery4000
Copy link

Jeffery4000 commented Jun 7, 2017

When i try editing folder or file name, it throw me an error

Error: Invalid backend response. Data is not JSON.

I was able to delete any file under root directory but not in any folder, with the same error message on top.

May i know whats the issue ?

As i was able to run everything fine on my ubuntu, when i try to locate elFinder to a web server. This things happend.

@Jeffery4000
Copy link
Author

Jeffery4000 commented Jun 7, 2017

Hi, i might found the issue. Usually the delete command will be 'rm', but the system that im using require to use 'trm' instead. Its that possible that I can do any modification on this?

But still got no idea whats going on cant create folder or txt document.

@nao-pon
Copy link
Member

nao-pon commented Jun 7, 2017

@Jeffery4000 The localFileSystem driver of elFinder uses PHP's file function to process it. For example, file deletion is unlink(). It is difficult to respond if files can not be processed with these functions.

@Jeffery4000
Copy link
Author

@nao-pon Hi, thanks for your reply. I tested with a common php script below and it successfully delete my test.txt in the same directory. So its seems like my unlink function is working correctly. I got problem deleting a folder which is not empty. Any idea on how to do this?

$Path = './test.txt';
if (unlink($Path)) {
echo "success";
} else {
echo "fail";
}

Problem encounter:

  1. Not able to delete a folder which is not empty.
  2. Not able to delete any file in a folder but can delete under root directory
  3. Not able to edit any filename or creating a new file or folder.

@Jeffery4000
Copy link
Author

I tried other web file explorer running php as well, everything seems fine. But i will still prefer elFinder, so hope that we could find out the issue here. Thank you.

@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

Did you check the permissions?

@Jeffery4000
Copy link
Author

Do you mean the file/folder permission? Yes, I did.
drwxr-xr-x

@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

Yes, it is. Is the owner of the folder a PHP execution account? If not, please change it to 0777 and so on.

@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

Also, please set error_reporting (-1) in connector(.mimimal).php and check whether error is output to server response.

@Jeffery4000
Copy link
Author

@nao-pon Thanks for your prompt reply. I did what you mentioned, and there seems no error on apache server log.

@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

If the folder name and the file name are ASCII character strings, the locale problem will not occur.

By the way. You said "Error: Invalid backend response. Data is not JSON." in the first. Can you check HTTP responce at that case?

@Jeffery4000
Copy link
Author

this is what im getting
<Fatal error: Uncaught ArgumentCountError: Too few arguments to function access(), 5 passed in /home/psltr/.app/apache2/htdocs/elfinder/php/elFinderVolumeDriver.class.php on line 3677 and exactly 6 expected in /home/psltr/.app/apache2/htdocs/elfinder/php/connector.minimal.php:84 Stack trace: #0 /home/psltr/.app/apache2/htdocs/elfinder/php/elFinderVolumeDriver.class.php(3677): access('write', '/home/psltr/.ap...', NULL, Object(elFinderVolumeLocalFileSystem), true) #1 /home/psltr/.app/apache2/htdocs/elfinder/php/elFinderVolumeDriver.class.php(2087): elFinderVolumeDriver->allowCreate('/home/psltr/.ap...', 'a', true) #2 /home/psltr/.app/apache2/htdocs/elfinder/php/elFinder.class.php(1589): elFinderVolumeDriver->rename('l1_ZWxGaW5kZXIt...', 'a') #3 /home/psltr/.app/apache2/htdocs/elfinder/php/elFinder.class.php(792): elFinder->rename(Array) #4 /home/psltr/.app/apache2/htdocs/elfinder/php/elFinderConnector.class.php(155): elFinder->exec('rename', Array) #5 /home/psltr/.app/apache2/htdocs/elfinder/php/connector.minimal.php(125): in /home/psltr/.app/apache2/htdocs/elfinder/php/connector.minimal.php on line 84>

@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

OK, Probably, elFinder version is old. Please try the latest 2.1.24 or nightly build.

@Jeffery4000
Copy link
Author

Tried both 2.1.24 and nightly build but all getting the same error. Should i give up and use other file explorer instead?

@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

Is it same to "Fatal error: Uncaught ArgumentCountError: Too few arguments to function access(), 5 passed in /home/psltr/.app/apache2/htdocs/elfinder/php/elFinderVolumeDriver.class.php on line 3677"? line 3677?

@nao-pon nao-pon self-assigned this Jun 8, 2017
@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

@Jeffery4000 I found a bug! I'll fix it. Really thanks!

@nao-pon nao-pon closed this as completed in 974664d Jun 8, 2017
@nao-pon
Copy link
Member

nao-pon commented Jun 8, 2017

I done fixes. Please check with nightly build. Thanks! 👍 

@Jeffery4000
Copy link
Author

Seems fine now with the nightly build. Thanks a lot =)

@frederik12345
Copy link

Long Path Tool deletes, copies and renames path too long files/folders. Try using long path tool . It worked for me . ! I hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants