Results 1 to 10 of 16
I want to give root privilege to the command rm for only a directory Dir inside /local/home. How I can do that?...
- 07-07-2009 #1
Giving rm root privilege for a particular directory
I want to give root privilege to the command rm for only a directory Dir inside /local/home. How I can do that?
Imran
Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
| 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686
- 07-07-2009 #2
Linux permissions
and why do you want to do that ?
- 07-07-2009 #3
To prevent anybody from deleting anything from that folder. Only root should have the ability to do that.
I'm sorry, but the link you've given doesn't help me BTW.Imran
Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
| 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686
- 07-07-2009 #4
I suppose that you want to make a directory undeleteable . Why not simply change the permission on that so that only the one who created that particular directory can only delete it.
this will only grant the owner of the directory to have complete control on the directory. Hope this helps you.Code:chmod o+rwx directory/
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 07-07-2009 #5
as long as the owner of the directory is root, all you need is to make sure that only owner has write access, above command would set that to be true, to make sure root owns it, just run
Code:chown -R root:root /local/home
- 07-07-2009 #6
I have a doubt , If the directory is owned by root then normal user will not have acces to it unless granted by the root.
Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 07-07-2009 #7
if you use
it will be readable by anyone, but only writeable by rootCode:chmod -R 744 /local/home
- 07-07-2009 #8
No here's the catch.
If i give rwx to only root, then a normal user can't even move a file from or to that directory, that I don't want to restrict. I just want to restrict the deletion of file, that's all.Imran
Linux User #467555 | Debian Squeeze | Intel(R) Core(TM)2 Duo CPU 4500 @ 2.20GHz | Gigabyte GA-G41MT-ES2L
| 2 GB RAM | 320 GB SATA | Kernel: 2.6.32-5-686
- 07-07-2009 #9
then try this
chmod a+rx directory
this will give every one a read and entering permission.Only if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 07-07-2009 #10
I'm not sure what you desire is possible without it being a samba share. You can't specify that a directory can only have something created and not deleted. I don't get what difference is between deleting a file and moving a file from the directory, they are the same, except moving has a destination. If it was a samba share, you could specify that the directory was world writeable, and all files created in it could have a specific mask that would not allow them to be modified or deleted once added, this is about as close as you can get to what you want I believe.


Reply With Quote