LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: 北南南北

关于linux用户\文件权限[重点解决,请弟兄弟跟帖]

[复制链接]
发表于 2004-8-16 20:17:41 | 显示全部楼层
没有错哦
发表于 2004-8-17 15:08:24 | 显示全部楼层

回复: 有关umask的计算

最初由 pupilzeng 发表
文件权限是666-umask值,文件夹是777-umask值
请问一下楼上的那位兄台,-s选项是用来干什么的?


if the value of umask is 000, the default permissions for any file created by that user are 777 - 000 = 777

可是是这位兄弟说的好像和我写的不一样吧
发表于 2004-8-17 15:35:44 | 显示全部楼层

Still confusing

After reading each experts' announcements as above, I am still confused about the concepts between SGID,SUID and gid, uid. Does anyone offer more?
发表于 2004-8-29 15:36:35 | 显示全部楼层
最初由 xfish 发表
if the value of umask is 000, the default permissions for any file created by that user are 777 - 000 = 777

这句是不是错了?


zhe ju shi you mao bing ,ru guo ba "file" gai cheng "directory" jiu dui le.
发表于 2004-8-29 21:26:30 | 显示全部楼层
set uid:chmod u+s filename
set gid:chmod g+s filename
sticky: chmod o+t filename
强制制与冒险位也可以通过一个数字加和
4(set uid)
2(set gid)
1(sticky)

chmod 4755结果-rwsr-xr-x(suid,文件属主具有读/写和执行的权限,所有其它的用户具有读和执行的权限)
chmod 6711 结果-rws--s--x(suid,sgid文件属主具有读/写和执行的权限,所有其它的用户具有读和执行的权限)
chmod 4511 结果-rwS--x--x(suid,文件属主有读,写权限.所有其他的用户有执行的权限,S表示相应的执行权限并未设置..这种suid可以忽略)
chmod并不会对权限组合进行检查,所以一个有执行权限的并不一定是一个程序或脚本...

如第二个例子改为
chmod 6711 peter
第一位为6,为4+2即是set uid和gid,本来peter是属于hello这个用户..这个组是没有读写的权限..但是现在也有了....我比较菜,不知道是不是这样理解的...
发表于 2004-8-29 21:29:35 | 显示全部楼层

这里人气旺....可是...没有人帮我.

半个月的问题...........
connect_from_port_20=yes
listen_port=21
pasv_enable=yes
chroot_local_user=no
ascii_download_enable=no
ascii_upload_enable=no
async_abor_enable=no
check_shell=no
one_process_model=no
nopriv_user=nobody
pam_service_name=vsftpd
local_enable=yes
local_umask=022
local_max_rate=0
anonymous_enable=yes
anon_world_readable_only=no
anon_upload_enable=yes
anon_mkdir_write_enable=yes
anon_other_write_enable=yes


系统为mandrake10.2.6.3-4mdk
tar包安装vsftp..可是匿名和本地用户为什么不能同时登录..如下错误...
也就是这个配置..匿名用户登录不了...

500 OOPS: vsftpd: refusing to run with writable anonymous root
Login failed.
421 Service not available, remote server has closed connection

xinetd下vsftpd,请你们帮忙.............3Q!哈哈...
发表于 2004-11-29 13:33:25 | 显示全部楼层

你好

把ftp目录的权限改一下让根用户不可写就可以了
发表于 2005-1-16 16:02:27 | 显示全部楼层
Post by thez
把ftp目录的权限改一下让根用户不可写就可以了


错:是此目录不充许所有者为FTP
chown root ~ftp; chmod -w ~ftp
试试
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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