Apple OS X Forum
How to restrict a folder in MAC OS X?
How to restrict a folder in MAC OS X?
by Marcio Oliveira on Jun 1, 2005 at 2:16:33 pm

I have two HDs and I want to protect the files of the second one. I created some permissions and everything looks good. No other user can access my folder. The problem is - THEY CAN DELETE IT. This behavior is very wierd. How can I protect the folder from being deleted by other users?

Do I need to change the permissions of the trash or the second HD?

BTW my OS and all my users are in the first HD.



Re: How to restrict a folder in MAC OS X?
by Mark Sloan on Jun 2, 2005 at 11:12:47 pm

What version of OS X are you using?


Re: How to restrict a folder in MAC OS X?
by Marcio Oliveira on Jun 4, 2005 at 2:52:09 pm

I


Re: How to restrict a folder in MAC OS X?
by MitchJi on Jun 4, 2005 at 5:47:48 pm

Hi,

File permissions look like this (root-owner-group):
-rw-r--r--
-rwxr--r--
drw-r--r--

d is a directory, r is read, w is write, x is execute.

So if you want to protect a file from reading you remove the group r
So if you want to protect a file from writing or deletion you remove the group w

For directories if you want the directory not to be able to be deleted you remove the group w
I think that would also protect the files inside the directory but I'm not sure.
I think removing the r would mean that others could not view the contents of the directory

You can change the permissions with chmod (man chmod for help)




Best Wishes,

Mitch


Re: How to restrict a folder in MAC OS X?
by Marcio Oliveira on Jun 7, 2005 at 6:57:25 pm

Hi Mitch, thanks for answering my question. But i got to tell you: I didn't understand. I don't know how and where I should put these commands in. I know I'm asking too much, but can you give me a real example? Let's say I have this folder named "test" in the desktop of my second HD called "HD02". The user I'm working on is "Me". How do I use these commands (r-t-w-d-x) to restrict this folder from being deleted by other users?
Is chmod the only way?

Please, if you could help me again, I would really appreciate.

Thanks in advance.


Re: How to restrict a folder in MAC OS X?
by Curtis Thompson on Jun 7, 2005 at 7:11:59 pm

hello...

not to jump in on mitch's thread, but you can do the chmod from the terminal - however, you can also ctrl-click (or right-click if you have a 2 button mouse) on the folder, select "get info" and control the permissions that way as well...

sitruc






© CreativeCOW.net