注册 登录
编程论坛 Linux教室

a question abt operate permission.

aipb2OO7 发布于 2007-10-07 16:13, 1464 次点击
description :
I use root status to create a directory, and set the access permission only to owner.
This is an ex:
mkdir -m 700 test (root status)
Then I change my status to a general user.
Now I can't open the dir-"test" and can't do operation like "ls" on it.This is all right because of my setting(700).
But the problem is the general user can delete the dir-"test".
Why?The other user("here means general user")have no right abt "w" mod(means modify delete copy...).
I think it's too dengerous,or sth. wrong with my operations.

Pls clear me!

Sorry ,no chinese input.
4 回复
#2
aipb2OO72007-10-07 16:14
By the way, my os is ubuntu7.04.
#3
可可熊2007-10-07 16:27
I think other user have access to test's parent directory,so they can delete it.

#4
aipb2OO72007-10-07 16:41
Yes,you mean like this:

test1 (created by user)

test1/test2 (test2 created by root)

so user can delete test2


but I think the test2 's strribute is "rwx------" so the others can't operate on it except root.
help me.
#5
woodhead2007-10-07 17:04
I think yes if it's a empty dir .
if the dir has a file create by root in it,
you can't delete the directory by user's power.
1