LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-18-2008, 02:01 PM   #1
tcsenthil
LQ Newbie
 
Registered: May 2008
Location: Bangalore
Posts: 10

Rep: Reputation: 0
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
 
Old 06-18-2008, 02:49 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Show the directory permissions and owner/group for all directories up to and including /depts/hr/test.
 
Old 06-18-2008, 06:20 PM   #3
kenoshi
Member
 
Registered: Sep 2007
Location: SF Bay Area, CA
Distribution: CentOS, SLES 10+, RHEL 3+, Debian Sarge
Posts: 159

Rep: Reputation: 32
Quote:
Originally Posted by tcsenthil View Post
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.
 
Old 06-19-2008, 09:01 AM   #4
tcsenthil
LQ Newbie
 
Registered: May 2008
Location: Bangalore
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you kenoshi,

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 02:50 AM
User permissions dmanchepalli Red Hat 2 02-14-2005 08:23 PM
user permissions cubax Linux - Security 4 12-17-2004 01:48 PM
user permissions paul62 Slackware 2 10-28-2004 03:15 PM
user permissions... roofy Linux - Software 6 05-09-2003 10:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration