Group Write Problems
Hi All,
I hope that I'm writing something that's new. This seems like a topic that would be well documented, however, I've yet to come across an explanation. Here goes... I've made a folder. I'm the owner and I want group www to be able to write to it. So, I chmod to 775 on that folder. If a new user is in the www as a secondary group, why is he/she unable to write to the folder? It seems so simple but in all the times that I've tried this I've failed. So I believe that I'm missing something fundamental here. Thank you for your help. |
You are the owner, but to which group does it belong.
Code:
wim@desktop1:~$ ls -l Code:
chgrp www newdir |
Wow, that was right on the money! chgrp worked just fine. I didn't include something very important in my description though. I had been using chown to make www the owning group of that folder. However, using chgrp did the trick. I wonder whats the difference between using chown and chgrp other than a regular user can use chgrp. Thanks!
|
It should work with chown as well
Code:
chown wim:www newdir |
Owner and Group Permissions -- CHOWN
chown lets you change both "OWNER" and "GROUP" where as chgrp just changes the group....
chown win:www /home/win/test_file.txt changes the owner and the group for the file test_file.txt in the home directory of the user win so if you want to change the group from www to dev_01 you would say, thus keeping the owner as win but allowing the group dev_01 to have access: chown win:dev_01 /home/win/test_file.txt chgrp changes just the group factor.... something i learned when changing the group permissions is that you also have to change the permission on the file. an example is when you use samba. lets say and in my case i had permissions on the file user_and_group_list.txt as 744 and wanted to allow all system users to be able to edit it i would have to make it 760 for the permission so that the group can access it. you see the permissions on a file are OWNER|GROUP|PUBLIC. so if i have 777 anyone and everyone can read/write/execute this file - which i dont want. i just wanted the group to be able to access this file and make chances but allow the public to do nothing with the file. Check out this UNIX File Permissions Tutorial for more information. This should help a lot with any permission problems you may have or may encounter in the future! Good luck and have fun! Hopefully this little blurb helps you to understand the permissions and ownership a little better and I hope I have not confused you in anyway.... |
All times are GMT -5. The time now is 02:10 AM. |