[GH-ISSUE #650] how to use nonempty mount option #367

Closed
opened 2026-03-04 01:44:50 +03:00 by kerem · 13 comments
Owner

Originally created by @Rohitverma47 on GitHub (Sep 25, 2017).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/650

when i am trying to mount a bucket on my ec2 instance using.
s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/passwd -o url=http://url.to.s3/ -o use_path_request_style

it is giving me an output:
s3fs: MOUNTPOINT directory /var/vcap/store is not empty.
s3fs: if you are sure this is safe, can use the 'nonempty' mount option.

how should i proceed further

thanks in advance

Originally created by @Rohitverma47 on GitHub (Sep 25, 2017). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/650 when i am trying to mount a bucket on my ec2 instance using. s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/passwd -o url=http://url.to.s3/ -o use_path_request_style it is giving me an output: s3fs: MOUNTPOINT directory /var/vcap/store is not empty. s3fs: if you are sure this is safe, can use the 'nonempty' mount option. how should i proceed further thanks in advance
kerem closed this issue 2026-03-04 01:44:50 +03:00
Author
Owner

@tiffting commented on GitHub (Nov 23, 2017):

I'm running into a similar issue. I was not able to find anything in the available s3fs documentation that would help me decide whether a non-empty mountpoint is safe or not. I also tried different ways of passing the nonempty option, but nothing seems to work. One example is below:

$ s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password,nonempty
fuse: unknown option `nonempty'
<!-- gh-comment-id:346599850 --> @tiffting commented on GitHub (Nov 23, 2017): I'm running into a similar issue. I was not able to find anything in the available s3fs documentation that would help me decide whether a non-empty mountpoint is safe or not. I also tried different ways of passing the nonempty option, but nothing seems to work. One example is below: ``` $ s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password,nonempty fuse: unknown option `nonempty' ```
Author
Owner

@ggtakec commented on GitHub (Nov 23, 2017):

@Rohitverma47
If there is some file/directory under your mount point , s3fs(mount command) can not mount to mount point directory.
Then you can use nonempty option, that option for s3fs can do.

@tiffting
What version s3fs do you use?
Please let us know the version and if you can run s3fs with dbglevel option and let us know logs.

Thanks in advance for your assistance.

<!-- gh-comment-id:346608198 --> @ggtakec commented on GitHub (Nov 23, 2017): @Rohitverma47 If there is some file/directory under your mount point , s3fs(mount command) can not mount to mount point directory. Then you can use nonempty option, that option for s3fs can do. @tiffting What version s3fs do you use? Please let us know the version and if you can run s3fs with dbglevel option and let us know logs. Thanks in advance for your assistance.
Author
Owner

@taqtiqa-mark commented on GitHub (Dec 2, 2017):

Hmm, I see this error message if I mount a clean directory but a subfolder was previously created while it was mounted to the s3 bucket. Hopefully that makes sense.

As best I can tell the S3 bucket is mounted correctly.
If I umount the mount point is empty. mount -a and the error message appears and the S3 bucket is correctly mounted and the subfolder is within the S3 bucket is present - as it should be

Hope that helps?

<!-- gh-comment-id:348673257 --> @taqtiqa-mark commented on GitHub (Dec 2, 2017): Hmm, I see this error message if I mount a clean directory but a subfolder was previously created while it was mounted to the s3 bucket. Hopefully that makes sense. As best I can tell the S3 bucket is mounted correctly. If I `umount` the mount point is empty. `mount -a` and the error message appears and the S3 bucket is correctly mounted and the subfolder is within the S3 bucket is present - as it should be Hope that helps?
Author
Owner

@Anky15 commented on GitHub (May 4, 2018):

I am trying to mount my google drive on colab to access some file , it did successfully in the first attempt .But later on,
Command line:
!mkdir -p drive
!google-drive-ocamlfuse drive

It is generating following error:
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option

Help!!

<!-- gh-comment-id:386555101 --> @Anky15 commented on GitHub (May 4, 2018): I am trying to mount my google drive on colab to access some file , it did successfully in the first attempt .But later on, Command line: !mkdir -p drive !google-drive-ocamlfuse drive It is generating following error: fuse: mountpoint is not empty fuse: if you are sure this is safe, use the 'nonempty' mount option Help!!
Author
Owner

@thepurpleowl commented on GitHub (Aug 23, 2018):

@Anky15
try this
!mkdir -p drive
!google-drive-ocamlfuse drive -o nonempty

The same problem occurred me when I changed hardware accelerator to None from GPU. It didn't ask for re-authorization, but files couldn't be found. So I remounted the drive with 'nonempty' mount option.

<!-- gh-comment-id:415376930 --> @thepurpleowl commented on GitHub (Aug 23, 2018): @Anky15 try this !mkdir -p drive !google-drive-ocamlfuse drive -o nonempty The same problem occurred me when I changed hardware accelerator to None from GPU. It didn't ask for re-authorization, but files couldn't be found. So I remounted the drive with 'nonempty' mount option.
Author
Owner

@mozafar commented on GitHub (Oct 22, 2018):

@Rohitverma47
I had same problem and I used seperate -o nonempty like this at the end:
s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password -o nonempty

<!-- gh-comment-id:431802455 --> @mozafar commented on GitHub (Oct 22, 2018): @Rohitverma47 I had same problem and I used seperate -o nonempty like this at the end: `s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password -o nonempty`
Author
Owner

@gaul commented on GitHub (Feb 3, 2020):

Closing due to inactivity. Please reopen if symptoms persist.

<!-- gh-comment-id:581294654 --> @gaul commented on GitHub (Feb 3, 2020): Closing due to inactivity. Please reopen if symptoms persist.
Author
Owner

@CesarSant2000 commented on GitHub (May 20, 2020):

You need to make sure that the files on the device mounted by fuse will not have the same paths and file names as files which already existing in the nonempty mountpoint. Otherwise this would lead to confusion. If you are sure, pass -o nonempty to the mount command.

<!-- gh-comment-id:631741530 --> @CesarSant2000 commented on GitHub (May 20, 2020): You need to make sure that the files on the device mounted by fuse will not have the same paths and file names as files which already existing in the nonempty mountpoint. Otherwise this would lead to confusion. If you are sure, pass -o nonempty to the mount command.
Author
Owner

@mfsiat commented on GitHub (Aug 25, 2020):

@Rohitverma47
I had same problem and I used seperate -o nonempty like this at the end:
s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password -o nonempty

Hello i have the same problem but adding a new tag with -o flag doesn't work on my aws ec2 instance. Could anyone help?

<!-- gh-comment-id:679850966 --> @mfsiat commented on GitHub (Aug 25, 2020): > @Rohitverma47 > I had same problem and I used seperate -o nonempty like this at the end: > `s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password -o nonempty` Hello i have the same problem but adding a new tag with -o flag doesn't work on my aws ec2 instance. Could anyone help?
Author
Owner

@techs2resolve commented on GitHub (Nov 23, 2020):

It is not working still. I am trying to mount my s3 bucket which has some data in it to my /var/www/html directory command run successfully but it is not mounting nor giving any error. I have tried both the way using Access key and IAM role but its not mounting. I am using Ubuntu 18.04
sudo s3fs -o nonempty /var/www/html -o passwd_file=~/.s3fs-creds

or IAM role

  1. sudo s3fs -o iam_role=”My_S3_EFS” -o url=”https://s3-ap-south-1.amazonaws.com" -o endpoint=ap-south-1 -o dbglevel=info -o curldbg -o allow_other -o use_cache=/tmp /var/www/html

  2. sudo s3fs /var/www/html -o rw,allow_other,uid=1000,gid=33,default_acl=public-read,iam_role=My_S3_EFS

  3. sudo s3fs -o nonempty /var/www/html -o rw,allow_other,uid=1000,gid=33,default_acl=public-read,iam_role=My_S3_EFS

Nothing works Please help

<!-- gh-comment-id:732142773 --> @techs2resolve commented on GitHub (Nov 23, 2020): It is not working still. I am trying to mount my s3 bucket which has some data in it to my /var/www/html directory command run successfully but it is not mounting nor giving any error. I have tried both the way using Access key and IAM role but its not mounting. I am using Ubuntu 18.04 sudo s3fs -o nonempty <bucket-name> /var/www/html -o passwd_file=~/.s3fs-creds or IAM role 1) sudo s3fs -o iam_role=”My_S3_EFS” -o url=”https://s3-ap-south-1.amazonaws.com" -o endpoint=ap-south-1 -o dbglevel=info -o curldbg -o allow_other -o use_cache=/tmp <bucket-name> /var/www/html 2) sudo s3fs <bucket-name> /var/www/html -o rw,allow_other,uid=1000,gid=33,default_acl=public-read,iam_role=My_S3_EFS 3) sudo s3fs -o nonempty <bucket-name> /var/www/html -o rw,allow_other,uid=1000,gid=33,default_acl=public-read,iam_role=My_S3_EFS Nothing works Please help
Author
Owner

@mfsiat commented on GitHub (Mar 24, 2021):

@Rohitverma47
I had same problem and I used seperate -o nonempty like this at the end:
s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password -o nonempty

Hello i have the same problem but adding a new tag with -o flag doesn't work on my aws ec2 instance. Could anyone help?

Hello again,
well I successfully mounted my bucket on the s3 from my aws ec2. so thought if this helps someone. Well the folder which needs to be mounted must be empty. It is the default behavior of the sefs mounting. But you can also use the -o nonempty flag at the end. And also you need to make sure that you have the proper access rights from the IAM policies.
s3fs bucket_name mounting_point -o allow_other -o passwd_file=~/.passwds3fs

<!-- gh-comment-id:805503497 --> @mfsiat commented on GitHub (Mar 24, 2021): > > @Rohitverma47 > > I had same problem and I used seperate -o nonempty like this at the end: > > `s3fs mybucket /path/to/mountpoint -o passwd_file=/path/to/password -o nonempty` > > Hello i have the same problem but adding a new tag with -o flag doesn't work on my aws ec2 instance. Could anyone help? Hello again, well I successfully mounted my bucket on the s3 from my aws ec2. so thought if this helps someone. Well the folder which needs to be mounted must be empty. It is the default behavior of the sefs mounting. But you can also use the **-o nonempty** flag at the end. And also you need to make sure that you have the proper access rights from the IAM policies. `s3fs bucket_name mounting_point -o allow_other -o passwd_file=~/.passwds3fs`
Author
Owner

@00void00 commented on GitHub (Jul 20, 2021):

I am using an EKS cluster and have given proper access rights to the worker nodes to use S3. My S3 objects are available under /var/s3fs inside pod that is running as DaemonSet and using hostPath: /mnt/data. Tried launching application pod that uses the same hostPath to fetch S3 content but received the above error.

Any suggestions what to do?

<!-- gh-comment-id:883744593 --> @00void00 commented on GitHub (Jul 20, 2021): I am using an EKS cluster and have given proper access rights to the worker nodes to use S3. My S3 objects are available under /var/s3fs inside pod that is running as DaemonSet and using hostPath: /mnt/data. Tried launching application pod that uses the same hostPath to fetch S3 content but received the above error. Any suggestions what to do?
Author
Owner

@tobiascapin commented on GitHub (May 16, 2025):

I'm facing this error too:
s3fs: MOUNTPOINT directory /mnt/s3-storage is not empty. if you are sure this is safe, can use the 'nonempty' mount option.
But /mnt/s3-storage is completely empty, why I'm getting this error?

This is my mount command
srvap-storage /mnt/s3-storage fuse.s3fs _netdev,allow_other,passwd_file=/etc/aws/passwd,endpoint=eu-south-1,url=https://s3.eu-south-1.amazonaws.com 0 0

<!-- gh-comment-id:2885936818 --> @tobiascapin commented on GitHub (May 16, 2025): I'm facing this error too: `s3fs: MOUNTPOINT directory /mnt/s3-storage is not empty. if you are sure this is safe, can use the 'nonempty' mount option.` But `/mnt/s3-storage` is completely empty, why I'm getting this error? This is my mount command `srvap-storage /mnt/s3-storage fuse.s3fs _netdev,allow_other,passwd_file=/etc/aws/passwd,endpoint=eu-south-1,url=https://s3.eu-south-1.amazonaws.com 0 0`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#367
No description provided.