学习型 ASP/PHP/ASP.NET 主机 30元/年全能 ASP/PHP/ASP.NET 主机,支持月付专业 MSSQL 数据库空间,支持月付专业 MySQL 数据库空间,支持月付
发新话题
打印

a question abt operate permission.

a question abt operate permission.

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.

TOP

By the way, my os is ubuntu7.04.
[glow=255,yellow,5]菜鸟一个.以后靠你们了..[/glow]

TOP

I think other user have access to test's parent directory,so they can delete it.

TOP

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.
[glow=255,yellow,5]菜鸟一个.以后靠你们了..[/glow]

TOP

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.

TOP

发新话题