file permission on linux
hi all,
im very new for linux. is possible to make a folder permission like below? -user can create files/folders in the shared folder. -but the files/folders they created, cannot be delete/change by em. (only can be delete by root users) -each new files/folders created will auto owner to root only. thanks in advance! |
Hello and Welcome to LinuxQuestions,
In my opinion this sounds pretty much like an exam question or homework. At least it's something I'd consider asking in a test. Since we're not in the habit of providing guides/howto/ready made solutions, I'm asking you what you've tried so far and what the results are or where it's failing. There's a lot you can do with various commands in order to achieve what you need/want. But you'll have to research, read, try, solve and when you cannot find any solution we'd be happy to assist. Have fun with Linux. Kind regards, Eric |
hi, thanks for advice.
ive been keep trying over and over to get this work. here is getfacl from /UserShared: file: /UserShared # owner: root # group: usershared user::rwx group::rwx other::r-x now all the users can create/delete files in /UserShared folder. how can i remove deleting permission from em?? (this is what im trying to do):confused: the permission only r w x if i remove w from em, yes they cant delete the files but they also cannot creating files :( |
Consider that creating a file requires 'writing' to the dir file itself ... so does deleting a file, because again you are 'writing' in the dir file itself.
https://secure.wikimedia.org/wikipedia/en/wiki/Inode https://secure.wikimedia.org/wikiped...nter_structure Write perm on the data file is write perm to edit the data content of the data file. HTH |
This is almost impossible as chrism stated. Creating a file and deleting a file both use write permissions. If you allow them to create a file, they'll be allowed to delete it.
There might be a round about way of doing it (forcing the user to revoke themselves write permissions to that file right after creating it), but there's no easy or consistent way of doing that that I know of. |
All times are GMT -5. The time now is 06:20 AM. |