LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Regarding User permissions (https://www.linuxquestions.org/questions/linux-newbie-8/regarding-user-permissions-650138/)

tcsenthil 06-18-2008 02:01 PM

Regarding User permissions
 
Hi,

I have created two users and assigned to two different groups and created common directory for both groups, finally when am trying to crate a file from one user to its own directory, am getting access denied error message.

The following steps, I have tried for to get a solution.

first-- echo 'umask 002' >> /etc/skel/.bashrc

useradd

1) useradd joshua
2) useradd alex

groups

3) groupadd hr
4) groupadd web

assigned users to group

5) usermod -G joshua hr
6) usermod -G alex web

created directory and changed the group ownership.

7) mkdir -p /depts/{hr,web}

chgrp hr /depts/hr
chgrp web /depts/web

Given permission for access

8) chmod 770 /depts/*

9) chmod g+s /depts/*

Once finished, if i tried to create a one file through the following command, am getting the Permission denied message.

[root@stationX]# su - joshua
[root@stationX]# touch /depts/hr/test

Please provide some solution for to create a file in that directory..

Could you please let me know where I missed commands to get a solution.

Thanks in advance

By
Senthil

Mr. C. 06-18-2008 02:49 PM

Show the directory permissions and owner/group for all directories up to and including /depts/hr/test.

kenoshi 06-18-2008 06:20 PM

Quote:

Originally Posted by tcsenthil (Post 3188452)
assigned users to group

5) usermod -G joshua hr
6) usermod -G alex web

This should be:

usermod -G hr joshua
usermod -G web alex

Hope this helps.

tcsenthil 06-19-2008 09:01 AM

Thank you kenoshi,

I will try out.. I will let you know.


All times are GMT -5. The time now is 03:15 PM.