Oracle Cloud Object Storage can be mounted as a local file system on Linux using s3fs, an open‑source FUSE‑based driver that provides seamless access to S3‑compatible object storage.
S3FS Installation
Oracle Linux 7
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install s3fs-fuse
Oracle Linux 8
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum install s3fs-fuse
Oracle Linux 9
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo yum install s3fs-fuse
RHEL and CentOS 7
sudo yum install epel-release
sudo yum install s3fs-fuse
Ubuntu/Debian
sudo apt install s3fs
Manual Installation (All Distros)
sudo yum install automake fuse fuse-devel gcc-c++ git libcurl-devel libxml2-devel make openssl-devel
git clone https://github.com/s3fs-fuse/s3fs-fuse.git
cd s3fs-fuse
./autogen.sh
./configure
make
sudo make install
Create a Password File
Save your Oracle Cloud credentials in a hidden file:
nano ~/.passwd-s3fs
Add the following line (use your actual access keys):
AccessKey:SecretKey
de007dd7b498d3e51a801e63353ca1aa567baf3e:N8G9jv06+EobLiHmiiG2WqW8tbSE3I779L5NZFbHfdI=
Set the appropriate permissions:
chmod 600 ~/.passwd-s3fs
Create a Mount Point
Choose or create a directory where the bucket should be mounted:
mkdir /mnt/mybucket
Mount the Bucket
Use the following command to mount your bucket:
sudo s3fs <bucket_name> /mnt/mybucket \
-o endpoint=<oci_region_name> \
-o passwd_file=~/.passwd-s3fs \
-o url=https://<object_storage_namespace>.compat.objectstorage.<oci_region_name>.oraclecloud.com/ \
-onomultipart -o use_path_request_style
Example
sudo s3fs my-oci-bucket /mnt/mybucket \
-o endpoint=us-ashburn-1 \
-o passwd_file=~/.passwd-s3fs \
-o url=https://mytenancy.compat.objectstorage.us-ashburn-1.oraclecloud.com/ \
-onomultipart -o use_path_request_style
Make the Mount Persistent (fstab)
To remount the bucket automatically on boot, add the following line to /etc/fstab:
s3fs#<bucket_name> /mnt/mybucket fuse _netdev,endpoint=<oci_region_name>,passwd_file=/home/<username>/.passwd-s3fs,url=https://<object_storage_namespace>.compat.objectstorage.<oci_region_name>.oraclecloud.com/,nomultipart,use_path_request_style 0 0
Note
- Replace
<username>,<bucket_name>,<oci_region_name>, and<object_storage_namespace>with your actual values. - Make sure
/etc/fstabis correctly configured to avoid boot issues.
After completing these steps, verify that the bucket is accessible under the mount point and that it automatically remounts after a system reboot. This provides a native‑file‑system experience for Oracle Cloud Object Storage on any supported Linux distribution.
