-
Notifications
You must be signed in to change notification settings - Fork 152
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
里面文件没有执行权限问题 #7
Comments
www-data用户进入里面文件是bash: cd: xxx/: Operation not permitted |
您好,里面文件的权限是您在创建文件时指定的,您也可以通过chmod这样的命令去更改。 |
这样太麻烦了,如果有时候重启服务器,又要使用chmod命令去修改,如果文件大小有1T去递归,时间也要很长了。可以搞一个选项出来,里面文件默认权限,默认所归于那个用户和那个用户组。这样,我就可以归于www-data用户,操作就好很多了。希望这个建议可以接纳。 |
您好,ossfs会把文件的属性信息保存在oss object user-custom-meta中。如果您mount一个bucket,而这个bucket里已经存在的历史文件不是通过ossfs产生的,比如通过控制台,或者oss browser/sdk等方式写入的,那么这些文件是没有ossfs需要的文件权限等源信息。所以你在ossfs中ls -l看到这些文件的权限,可能是000。 在这种情况下,您必须通过chmod等命令更改这些文件的属性,一旦更改成功,这些属性就保存到oss上去了,下次挂载就不需要重新设置了。另外,chmod效率和目标文件的大小没有关系。 |
好的,问题解决的,非常感谢你的回复。 |
您好,新的版本已经支持了您要求的功能。通过default_permission参数,您能够指定文件的默认权限,例如777。 ossfs your_bucket your_mountpoint -ourl=your_url -odefault_permission=777 |
ossfs xxx /data/oss2 -ourl=http://oss-cn-hangzhou-internal.aliyuncs.com -o allow_other
/data/oss2 有777权限,但是里面的文件全部都是rx-rx-rx权限。怎么样里面文件的默认权限也是777?
The text was updated successfully, but these errors were encountered: