您的位置:首页 > 其它

个人一点小经验分享

2014-06-10 15:15 330 查看
我们在LINUX下挂载windows分区后,默认情况下,挂载的分区只有root用户可以读写.
有没有办法让挂载的分区能让普通用户也可以正常读写呢?
man mount发现如下一段话:
uid=value and gid=value
Set the owner and group of the root of the file system (default: uid=gid=0, but with option uid or gid without specified value, the uid and gid of the current process are taken).
原来在挂载时加上这两个选项就可以了,如下:
mount -o uid=509,gid=509 //172.30.1.71/imagessource /data/images
(509是需要读写该分区的普通用户的UID和GID)
再用UID为509的用户登录后测试发现在该分区读写正常了.
当然,如果你用/etc/fstab文件配置的话,直接在defaults后面加上,uid=500,gid=500就行了.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐