Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何实现0770挂载权限 #5

Closed
ilovintit opened this issue Jan 7, 2016 · 8 comments
Closed

如何实现0770挂载权限 #5

ilovintit opened this issue Jan 7, 2016 · 8 comments

Comments

@ilovintit
Copy link

我使用owncloud搭建私有云盘,把data目录指向ossfs的目录,如果使用allow_other,会变成777权限,owncloud会报错,不允许权限。如果不使用allow_other,但是把用户ID改为apacheID,就会变成700权限,就会导致无法访问的问题。

@hryang
Copy link
Contributor

hryang commented Jan 8, 2016

您好,owncloud的用户id是什么?也是apacheID吗?

@ilovintit
Copy link
Author

我通过查看源码,解决了这个问题,最终挂载的语句是
ossfs#your_bucket your_mount_point fuse _netdev,url=your_endpoint,uid=your_apache_user_id,gid=your_apache_group_id,umask=007,allow_other 0 0这里有个比较奇怪的是umask的数值系跟上面的0770反过来,7等于0,0等于7,具体原因没去深究。

@hryang
Copy link
Contributor

hryang commented Jan 8, 2016

哦,是的,可以通过umask来设置合适的权限

@jeromety
Copy link

设置umask后,全部文件和文件夹都使用了统一权限。基于文件夹755文件644原则,我再设置chmod 644 。。。。.jpg后此文件权限并没改变,这是为何呢?

@ghost
Copy link

ghost commented Feb 6, 2017

加上-o mp_umask=007 ,如( -o mp_umask=027,权限就变成777-027=750(rwxr-x---))。这个只对挂载目录有效

@crabdave
Copy link

使用OwnCloud Docker容器+阿里云OSS搭建自己的云盘服务 on Centos 7
http://crabdave.iteye.com/blog/2356624

@997862
Copy link

997862 commented Jul 19, 2017

我使用ossfs my_bucket /mnt/disk -ourl=oss-cn-beijing.aliyuncs.com -o allow_other -o mp_umask=027挂载目录,挂载不成功!求解!
但是使用ossfs my_bucket /mnt/disk -ourl=oss-cn-beijing.aliyuncs.com -o allow_other是可以挂载上得,但是目录权限就变成了777,owncloud一样是不允许的!

@oldthreefeng
Copy link

-ouid=995 -ogid=995 -o mp_umask=007 -o allow_other 挂载加上uid和gid就好了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants