Rename operation on a file/folder is not atomic.list directory, COSFS performs unsatisfactorily as it requires remote access to the COS server.cd command to switch to another directory and then mount and unmount the files at the mount point.sudo apt install libfuse-dev libcurl4-openssl-dev libxml2-dev libssl-dev -y
sudo yum install libxml2-devel libcurl-devel fuse-devel openssl-devel fuse -y
cat /etc/centos-release to view the CentOS version and select an installation package for the corresponding version:cat /etc/os-release to view the Ubuntu version and select an installation package for the corresponding version:$download_url below with a download URL for the corresponding OS version.curl -o cosfs $download_urlchmod +x cosfsmv cosfs /usr/local/bin/cosfs
automake, git, libcurl-devel, libxml2-devel, fuse-devel, make, and openssl-devel. The following describes how to install dependency software on Ubuntu, CentOS, SUSE, and macOS:sudo apt-get install automake autotools-dev g++ git libcurl4-gnutls-dev libfuse-dev libssl-dev libxml2-dev make pkg-config fuse
sudo yum install automake gcc-c++ git libcurl-devel libxml2-devel fuse-devel make openssl-devel fuse
sudo zypper install gcc-c++ automake make libcurl-devel libxml2-devel openssl-devel pkg-config
brew install automake git curl libxml2 make pkg-config opensslbrew install cask osxfuse
/usr/cosfs as an example. You can use another directory as needed.sudo git clone https://github.com/tencentyun/cosfs /usr/cosfs
cd /usr/cosfssudo ./autogen.shsudo ./configuresudo makesudo make installcosfs --version #View the COSFS version number
configure operation vary depending on the OS. If your FUSE version is earlier than 2.8.4, the following error message will be displayed:checking for common_lib_checking... configure: error: Package requirements (fuse >= 2.8.4 libcurl >= 7.0 libxml-2.0 >= 2.6) were not met:Requested 'fuse >= 2.8.4' but version of fuse is 2.8.3
sudo yum -y remove fuse-develyum -y remove fuse-devel84%97sudo wget https://github.com/libfuse/libfuse/releases/download/fuse_2_9_4/fuse-2.9.4.tar.gztar -zxvf fuse-2.9.4.tar.gzcd fuse-2.9.4sudo ./configuresudo makesudo make installexport PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/:/usr/local/lib/pkgconfigmodprobe fuse # Mount FUSE's kernel module.echo "/usr/local/lib" >> /etc/ld.so.confldconfig #Update the dynamic link librarypkg-config --modversion fuse #View the fuse version number. If "2.9.4" is displayed, fuse 2.9.4 is installed successfully.
example/fusexmp.c by using /*content*/. Otherwise, an error will be reported when you use Make.zypper remove fuse libfuse2yum -y remove fuse-devel84%97sudo wget https://github.com/libfuse/libfuse/releases/download/fuse_2_9_4/fuse-2.9.4.tar.gztar -zxvf fuse-2.9.4.tar.gzcd fuse-2.9.4sudo ./configuresudo makesudo make installexport PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/:/usr/local/lib/pkgconfigmodprobe fuse # Mount FUSE's kernel module.echo "/usr/local/lib" >> /etc/ld.so.confldconfig # Update the dynamic-link library.pkg-config --modversion fuse #View the fuse version number. If "2.9.4" is displayed, fuse 2.9.4 is installed successfully.
configure: error: Package requirements (fuse >= 2.7.3 libcurl >= 7.0 libxml-2.0 >2.6 libcrypto >= 0.9) were not metNo package 'libcrypto' found
brew info opensslexport PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig #You may need to modify this command based on the message displayed for the previous command.
/etc/passwd-cosfs file, including the bucket name (in BucketName-APPID format), <SecretId>, as well as <SecretKey>, and use colons (:) to separate them. To avoid compromising your key, set permissions for the key file to 640. Run the following command to configure the /etc/passwd-cosfs key file:sudo su # Switch to the root account to modify the /etc/passwd-cosfs file. Skip this step if you have already logged in with the root accountecho <BucketName-APPID>:<SecretId>:<SecretKey> > /etc/passwd-cosfschmod 640 /etc/passwd-cosfs
$HOME/.passwd-cosfs. Alternatively, you can run -opasswd_file=[path] to specify the directory of the key file and then set permissions of the key file to 600.echo examplebucket-1250000000:AKIDHTVVaVR6e3****:PdkhT9e2rZCfy6**** > /etc/passwd-cosfschmod 640 /etc/passwd-cosfs
cosfs <BucketName-APPID> <MountPoint> -ourl=http://cos.<Region>.myqcloud.com -odbglevel=info -oallow_other
/mnt.ap-guangzhou and eu-frankfurt. For more information about region abbreviations, see Regions and Access Endpoints.-odbglevel specifies the log level. The default value is crit. Available options are crit, error, warn, info, and debug.-oallow_other allows other users to access the mount folder.mkdir -p /mnt/cosfscosfs examplebucket-1250000000 /mnt/cosfs -ourl=http://cos.ap-guangzhou.myqcloud.com -odbglevel=info -onoxattr -oallow_other
oensure_diskfree=[size] option to set the size of available hard disk space in MB reserved by COSFS. For example, -oensure_diskfree=1024 indicates that COSFS will reserve 1024 MB of free space.Method 1: Use `fusermount -u /mnt, fusermount` to unmount a FUSE file systemMethod 2: Use `umount -l /mnt`. The unmount operation will be performed when no program is using any file in the file system.Method 3: Use `umount /mnt`. If any program is using a file in the file system during the unmount, an error will be reported.
info, dbg, warn, err, crit. You are advised to set it to info in the production environment, and dbg for debugging. If you do not clear system logs regularly, or numerous logs will be generated due to a huge access volume, you can set it to err or crit.id -u username. For example, you can run id -u user_00 to obtain the uid of user_00.oensure_diskfree=[size] option to set the size of available hard disk space in MB reserved by COSFS. For example, -oensure_diskfree=1024 indicates that COSFS will reserve 1024 MB of free space.Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback