aws-solutions / simple-file-manager-for-amazon-efs

Serverless web application to manage data in your Amazon EFS Filesystem
Apache License 2.0
79 stars 30 forks source link

Can't download, upload or delete files using the web UI #208

Open luiztauffer opened 10 months ago

luiztauffer commented 10 months ago

Describe the bug

I can't upload, download or delete files. It gives me an error message: File was unable to be uploaded successfully. Check API logs. When trying to download, it just gets stuck in the download message...

I managed to deploy the stack successfully, and logged in the web UI. I can see folders and files created by other processes (EC2 machines) in the file system.

Please complete the following information about the solution:

simonkrol commented 10 months ago

Hi @luiztauffer,

That is very strange, is this happening with the default admin user created upon deploying the stack? If so, have you made any changes to the Cognito user pool or Cognito administrator group?

Let me know, Simon

luiztauffer commented 10 months ago

Hey @simonkrol , yes it happens with the default admin user. I haven't touched anything in Cognito, anything I should try and check out there?

simonkrol commented 10 months ago

Hmm, I haven't been able to reproduce this, can you try creating a clean EFS, onboarding it to your Simple File Manager instance and seeing what happens when you try to Upload?

We've seen similar issues before, but not in a way that you'd still have the ability to see the contents of the EFS.

Let me know, Simon

leon-mrks commented 9 months ago

Hey Guys!

Just wanted to hop in and say: same here Even after creating a new EFS instance the errors still appear.

Where can I find said "API logs"? maybe it helps to have a look. In CloudFront nothing useful showed up.

simonkrol commented 9 months ago

Hi @leon-mrks, You can check the file manager lambda to access it's CloudWatch logs.

To access the logs:

  1. Navigate to the CloudFormation console
  2. Look for the stack created for your EFS. It should have a name similar to {$SFMSTACKNAME}-ManagedResources-{$EFSName}
  3. Select the resources tab and click the Physical ID for the resource with the logical id: ManagedAccessPointFunction (This should bring you to the lambda console)
  4. On the lambda console, select the Monitor tab, and click View CloudWatch logs to bring you to the log group for your file system.

Please let me know if you find anything that might help with debugging, Thanks, Simon

leon-mrks commented 9 months ago

Thanks @simonkrol for the explanation!

Here is an example upload error:

1. START RequestId: <id_detacted> Version: $LATEST

2. {'operation': 'upload', 'path': '/mnt/efs', 'chunk_data': {'dzchunkindex': 0, 'dztotalfilesize': 31959, 'dzchunksize': 1000000, 'dztotalchunkcount': 1, 'dzchunkbyteoffset': 0, 'content': ... }

3. Could not write to file: [Errno 13] Permission denied: '/mnt/efs/example.txt'

4. END RequestId: <id_detacted>

The make_dir and delete operations do not log any errors though.