论坛风格切换切换到宽版
  • 1475阅读
  • 7回复

[问题求助]如何把一个Linux用户限制到一个目录? [复制链接]

上一主题 下一主题
离线kawayiyi.
 
发帖
2126
C币
-60558
威望
397
贡献值
1
银元
-2
铜钱
4789
人人网人气币
0
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-05-01
如.何把一个Linux用户限制到一个目录?只可以在它的目录操作,而不可以操作其他目录,包括不能浏览其他目录,即对.其他目录不可读。.

另外,怎.么让他在该目录只有编辑、修改文件等功能,.不能执行其他对系统有影响的命令.

谢谢

评价一下你浏览此帖子的感受

精彩

感动

搞笑

开心

愤怒

无聊

灌水
离线brokenfly.
发帖
1941
C币
-152808
威望
364
贡献值
1
银元
-2
铜钱
4383
人人网人气币
0
只看该作者 沙发  发表于: 2010-04-14
讨论过很多次了,这是对Linux/Unix缺乏理解时,容易问的一个问题。

离线lele521.
发帖
2033
C币
-60461
威望
412
贡献值
1
银元
-1
铜钱
4633
人人网人气币
0
只看该作者 板凳  发表于: 2010-04-14
不能浏览其他文件夹,他怎么执行命令?!
一个普通用户本来就只能在很有限的范围内创建、修改文件,本来也不能做什么对系统有害的操作。

发帖
2043
C币
-235292
威望
375
贡献值
1
银元
-3
铜钱
4576
人人网人气币
0
只看该作者 地板  发表于: 2010-04-14
楼主说的可能是ftp

离线jiayism.
发帖
2009
C币
-60549
威望
365
贡献值
1
银元
-2
铜钱
4584
人人网人气币
0
只看该作者 4楼 发表于: 2010-04-14
user, group, 750, 700

离线yeats520.
发帖
2217
C币
-151825
威望
453
贡献值
1
银元
-3
铜钱
5084
人人网人气币
0
只看该作者 5楼 发表于: 2010-04-14
我是路过的,支持个先.......

离线cnzol.
发帖
1942
C币
-141092
威望
321
贡献值
2
银元
0
铜钱
4152
人人网人气币
0
只看该作者 6楼 发表于: 2010-04-14
你去查查一个叫做rbash的东西,或许可以实现。

发帖
2108
C币
-235176
威望
396
贡献值
1
银元
-2
铜钱
4672
人人网人气币
0
只看该作者 7楼 发表于: 2010-04-14
rbash: restricted bash
RESTRICTED SHELL
If bash is started with the name rbash, or the -r option is supplied at invocation, the shell becomes restricted. A restricted shell is used to set up an environment more controlled than the standard shell. It behaves identically to bash with the exception that the following are disallowed or not performed:

changing directories with cd
setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
specifying command names containing /
specifying a file name containing a / as an argument to the . builtin command
Specifying a filename containing a slash as an argument to the -p option to the hash builtin command
importing function definitions from the shell environment at startup
parsing the value of SHELLOPTS from the shell environment at startup
redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
using the exec builtin command to replace the shell with another command
adding or deleting builtin commands with the -f and -d options to the enable builtin command
Using the enable builtin command to enable disabled shell builtins
specifying the -p option to the command builtin command
turning off restricted mode with set +r or set +o restricted.
These restrictions are enforced after any startup files are read.

When a command that is found to be a shell script is executed, rbash turns off any restrictions in the shell spawned to execute the script
快速回复
限100 字节
批量上传需要先选择文件,再选择上传
 
上一个 下一个