You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 18.04挂载Digital Ocean存储后进入目录提示‘Operation not allowed’求助

Fixing "Operation not allowed" Error with s3fs Mounting Digital Ocean Spaces on Ubuntu 18.04

Let's break down the issues from your logs and resolve them step by step:

Key Observations from Logs

  • The warning contents_xp->nodesetval is empty indicates s3fs couldn't list the bucket contents (either the bucket is empty, or there's a communication/permissions issue).
  • The repeated s3fs_access checks for X_OK (execute permission) on /minimoj-consumer point to a permission or mount configuration problem.

Step 1: Secure Your .passwd-s3fs File

s3fs requires strict permissions on the credentials file to prevent unauthorized access. Run this command to set the correct permissions:

chmod 600 /home/ivan/hosts/docker-symfony/symfony/.passwd-s3fs

Step 2: Fix Mount Command for Digital Ocean Spaces

Digital Ocean Spaces uses path-style request formatting, which isn't enabled by default in s3fs. Additionally, you need to ensure the mount point is accessible by your user.

First, unmount the current broken mount:

fusermount -u /home/ivan/hosts/docker-symfony/symfony/do1

Then remount with the corrected options:

s3fs minimoj-consumer /home/ivan/hosts/docker-symfony/symfony/do1 \
  -o passwd_file=/home/ivan/hosts/docker-symfony/symfony/.passwd-s3fs \
  -o url=https://ams3.digitaloceanspaces.com \
  -o use_path_request_style \
  -o uid=$(id -u ivan) \
  -o gid=$(id -g ivan) \
  -o dbglevel=info -f -o curldbg

What these options do:

  • use_path_request_style: Forces s3fs to use path-style URLs (required for Digital Ocean Spaces).
  • uid/gid: Sets the owner of the mount point to your user (ivan), so you can read/write without root privileges.

Step 3: Verify Credentials and Bucket Permissions

Test if your credentials have access to the bucket using curl:

curl -u YOUR_ACCESS_KEY:YOUR_SECRET_KEY https://ams3.digitaloceanspaces.com/minimoj-consumer/
  • If this returns an XML listing (even empty), your credentials are valid.
  • If you get an error, log into Digital Ocean's control panel:
    1. Go to your Spaces dashboard.
    2. Select the minimoj-consumer bucket.
    3. Navigate to Settings > Permissions and ensure your access key has at least Read and Write permissions for the bucket.

Step 4: Enable Multi-User Access (Optional)

If you need other users to access the mount point, enable allow_other:

  1. Edit /etc/fuse.conf and uncomment the line:
    user_allow_other
    
  2. Remount with the -o allow_other option added to the command above.

Managing Your Bucket Contents

Once mounted correctly, you can manage the bucket just like a local directory:

  • Create directories: mkdir /home/ivan/hosts/docker-symfony/symfony/do1/new-folder
  • Upload files: cp local-file.txt /home/ivan/hosts/docker-symfony/symfony/do1/
  • Delete files: rm /home/ivan/hosts/docker-symfony/symfony/do1/old-file.txt

Note: If the bucket was empty (as suggested by the log warning), you'll need to create directories/files first before navigating into them.

内容的提问来源于stack exchange,提问作者shuba.ivan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 08:02:44