LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1007|回复: 14

为什么我不能使用chmod了??

[复制链接]
发表于 2003-11-12 15:17:28 | 显示全部楼层 |阅读模式
Free# ls -ol ch*
-rwxr-xr-x  1 root  wheel  - 111 11 12 15:29 chkppp
-rwxr-xr-x  1 root  wheel  - 256 11  1 18:51 chmac
-rwxr-xr-x  1 root  wheel  - 367 11  1 18:51 chserver
Free# chmod 700 ch*
Free# ls -ol ch*
-rwxr-xr-x  1 root  wheel  - 111 11 12 15:29 chkppp
-rwxr-xr-x  1 root  wheel  - 256 11  1 18:51 chmac
-rwxr-xr-x  1 root  wheel  - 367 11  1 18:51 chserver

奇怪:ask :ask

我是在MSDOS分区的。
发表于 2003-11-12 16:07:19 | 显示全部楼层
Can you change filename with this partition?
发表于 2003-11-12 17:06:06 | 显示全部楼层
挂载的msdos, ntfs等分区只有root有权限写, 别的用户只能看不能写!
 楼主| 发表于 2003-11-12 17:11:51 | 显示全部楼层
Free# ls -lo ch*
-rwxr-xr-x  1 root  wheel  - 111 11 12 15:29 chkppp
-rwxr-xr-x  1 root  wheel  - 256 11  1 18:51 chmac
-rwxr-xr-x  1 root  wheel  - 367 11  1 18:51 chserver
Free# whami
bash: whami: command not found
Free# ls -ol ch*
-rwxr-xr-x  1 root  wheel  - 111 11 12 15:29 chkppp
-rwxr-xr-x  1 root  wheel  - 256 11  1 18:51 chmac
-rwxr-xr-x  1 root  wheel  - 367 11  1 18:51 chserver
Free# whoami
root
Free# chmod -R 700 ch*
Free# ls -ol ch*
-rwxr-xr-x  1 root  wheel  - 111 11 12 15:29 chkppp
-rwxr-xr-x  1 root  wheel  - 256 11  1 18:51 chmac
-rwxr-xr-x  1 root  wheel  - 367 11  1 18:51 chserver
Free# mv chmac chmac0
Free# ls chmac0
chmac0
Free#

我是用root的,能改变文件名。这个分区的参数是rw,noauto 0 0
发表于 2003-11-12 17:54:58 | 显示全部楼层
....
try this:
touch foo
ls -lrt
chmod a+x foo
chmod ug-rw foo
ls -lrt

and tell us the output of each command.
发表于 2003-11-12 19:03:38 | 显示全部楼层
不会吧?什么时候windows分区开始支持*nix的用户权限设定了?
home啊,你好象把版版也绕进去了。~o~
发表于 2003-11-12 19:16:34 | 显示全部楼层
Well, linux with xfs does a good file server for w2k (with windows's properties), but I don't know for the versa case and I'm not sure for freeBSD no either, that's why I told him to do a test...
发表于 2003-11-12 19:31:57 | 显示全部楼层
我上面的贴子有点太主观了,
刚刚在5.1下面,按版主的方法试了一下,root用户可以去掉或加上自身的w权限,不过也没有用处,rx不可变动。
而且不能改组或其它用户的权限
 楼主| 发表于 2003-11-12 20:35:22 | 显示全部楼层
我的结果和木各相同,root用户可以去掉或加上自身的w权限

在UFS用ROOT创建的文件,改变了用户,CP到MSDOS分区文件的用户就自动变成了ROOT,奇怪哦!!

看来是MSDOS文件系统不支持这样的功能。
发表于 2003-11-12 23:31:16 | 显示全部楼层
这个和mount 分区时候的umask 有关,系统默认的umask=022,  mount 的时候指定umask=000 即可。另外这样的分区,我做的时候,都是指定uid=nobody,gid=nobody.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表