V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
V2EX  ›  Busy  ›  全部回复第 25 页 / 共 126 页
回复总数  2519
1 ... 21  22  23  24  25  26  27  28  29  30 ... 126  
@blueboyggh 啥?什么地方,产假 158 天?
2017 年 6 月 6 日
回复了 0139 创建的主题 微信 微信小程序查了快递,支付宝发来通知
至少我知道支付宝可以查京东第三方商家发的韵达快递...自动的...
你需要特定的用户
那第一次挂在参数就 -o uid=username,gid=username,fmask=133,dmask=022

第二次 mount --bind

第三次 mount -o remount,bind,ro

这样不就是特定的用户 username 只读了?
host ~ # mkdir -p 123 456
host ~ # mount --bind 123 456
host ~ # mount -o remount,bind,ro 123 456
host ~ # cd 456; touch 123
touch: cannot touch '123': Read-only file system
@pq
man mount 中说的很清楚了啊

mkdir -p 123 456
mount --bind 123 456
mount -o remount,bind,ro 123 456
cd 456; touch 123

试试结果是什么
man mount

...

mount(8) since v2.27 allows to change the mount options by passing the relevant options along with --bind.
For example:

mount --bind,ro foo foo

This feature is not supported by the Linux kernel; it is implemented in userspace by an additional mount(2)
remounting system call. This solution is not atomic.

The alternative (classic) way to create a read-only bind mount is to use the remount operation, for example:

mount --bind olddir newdir
mount -o remount,bind,ro olddir newdir

Note that a read-only bind will create a read-only mountpoint (VFS entry), but the original filesystem
superblock will still be writable, meaning that the olddir will be writable, but the newdir will be read-only.

It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and relatime VFS entry flags by
"remount,bind" operation. It's impossible to change mount options recursively (for example with -o rbind,ro).
@pq 那第二次 mount 就 -o bind,ro
只读
第一行中 fmask=177,dmask=077
root 权限
mount -t ntfs-3g -o uid=root,gid=root,fmask=133,dmask=022 /dev/sdb1 /mnt/data

username 用户
mount -t ntfs-sg -o bind,uid=username,gid=users /mnt/data/dir /home/uid/path
为什么过了 3 年不给换,这个问题我上次手机换电池,特意问了天才吧,人家说可以换的,当然我买了延保服务。
2017 年 6 月 6 日
回复了 lvybupt 创建的主题 Apple 个人感觉 MAC Mini 已死
s/你如 /不如 /
2017 年 6 月 6 日
回复了 lvybupt 创建的主题 Apple 个人感觉 MAC Mini 已死
配置到你满意的 mac mini,外加个 4k 显示器
说真的,你如直接 iMac
2017 年 6 月 4 日
回复了 hiwower 创建的主题 杭州 房租又增加了 200 了
不是新闻说房租多地下降了么
2017 年 6 月 4 日
回复了 gscsnm 创建的主题 机械键盘 求助, filco 键盘选择, 87 or 104? 茶 or 红轴?
87 双模 茶
阿里终于压倒数字,成为行内口碑第一差
1 ... 21  22  23  24  25  26  27  28  29  30 ... 126  
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2711 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 39ms · UTC 04:47 · PVG 12:47 · LAX 21:47 · JFK 00:47
♥ Do have faith in what you're doing.