Ossfs设置开机启动

世界可以没有日本,不能没有海洋。

1)进入/etc/init.d/创建ossfs,把下面的内容复制 保存

#! /bin/bash
#
# ossfs      Automount Aliyun OSS Bucket in the specified direcotry.
#
# chkconfig: 2345 90 10
# description: Activates/Deactivates ossfs configured to start at boot time.

umount /www/wwwroot/owncloud/data
#cd /www/wwwroot/owncloud/
#rm -rf data
#mkdir data
#chown -R www:www /www/wwwroot/owncloud/data
ossfs your_bucket your_mountpoint -ourl=your_url,uid=1000,gid=1000,umask=007,allow_other

说明:

开启如果不卸载,直接挂载会报错

2)设置权限

chmod a+x /etc/init.d/ossfs
chkconfig ossfs on



知识共享许可协议本作品采用知识共享署名-相同方式共享 4.0 国际许可协议进行许可。

生成海报
点赞 0

暂无评论

相关推荐

Vim中排版脚本代码的技巧

当我们使用Vim编辑器编写脚本时,有时会因为复制粘贴的原因导致代码的排版格式混乱,给代码阅读和维护带来困难。本文介绍几个在Vim中排版脚本代码的技巧,包括如何进入粘贴模式、如何调整缩进、如何删除多余空格等。通过这些技巧,你可以在Vim中更加方便地编辑和维护代码。

目录展开