How to share files between users from same group
I need help,its urgent. I am just a beginner to unix and need to know how can two users form a same group can share files.
As a root I have created a directory called "share" and given permissions using chmod and chgrp. Two users ? user1 and user2 are in the same group called "friends". Now the problem I am getting is- user1 and user2 can access the file in the dir "share". But if user1 creates a file then user2 cannot edit it. I want both the user?s can create and edit each others files. I have changed user1 and user2 .bash_profile file and given a umask 007. Any help on this,its urgent. Regards, |
I don't think it's that urgent, I think it's homework, so I will only give you some directions.
|
permissions given to share folder in 770 and root is the owner.
thanks, |
Quote:
|
friends.
i can share the files. but i want that -files that are created should be group writable by default. |
Oh, I see, so the problem is that the umask is not working for some reason. Note that umask just sets a value, it doesn't directly enforce anything. In other words, applications can save the files with whatever permissions they think it's best, just like chmod can also change them.
Your best bet would be to monitor that directory with inotifywait, for file creation event, and each time a new file is created, chmod it (and chown it if necessary). This task can run as root on the background, and that way you don't have to rely on the users individual umasks. |
Thanks a lot.
|
Quote:
|
All times are GMT -5. The time now is 03:20 PM. |