LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-17-2015, 09:04 PM   #1
kee23
LQ Newbie
 
Registered: Sep 2015
Posts: 5

Rep: Reputation: Disabled
enable others to pass through ~ to access ~/project


hello,

I have created 2 users(mark and david) and a directory named project.
I wanted to enable other user to travel through ~ to access ~/project and I'm not sure how to enable it them to access, so what command would I use to achieve this?

using cent os7

Last edited by kee23; 11-17-2015 at 09:33 PM.
 
Old 11-17-2015, 09:28 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,357

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
The usual soln is to create a user & group called 'projectname' and chmod g+s the dir.
Add all relevant users to group projectname.
The chmod ensures that any files created by any (group) user will inherit the containing dir's group ie projectname, so will be available to all group members.

Its NOT recommended to give others access to your $HOME (ie '~' )
 
Old 11-17-2015, 09:33 PM   #3
kee23
LQ Newbie
 
Registered: Sep 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
if i were to use hardlinks what whould i have to do? if i have or allow that user have the permissions?
 
Old 11-17-2015, 10:28 PM   #4
kee23
LQ Newbie
 
Registered: Sep 2015
Posts: 5

Original Poster
Rep: Reputation: Disabled
another question, when i long list that user account home root ls -ld ~ and the output came out with
drwx-----x. 6 david david 4096(I made that x permission to others. so that other user(mark) can access through the hardlink, but i still don't know how to enable others to travel through) and i was wondering how would the user group ownership david change to music, I guess i have to change mark's group ownsership to music as well. so that both can access the ~/project? using chgrp but i dont know what synthax.... haha

or is it usermod -aG music david? on the root? to make david music

Last edited by kee23; 11-17-2015 at 11:01 PM.
 
Old 11-17-2015, 11:41 PM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,691

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by kee23 View Post
another question, when i long list that user account home root ls -ld ~
English is not my mother tongue, but I think your sentence "when i long list that user account home root" is ungrammatical and doesn't make sense.

Quote:
Originally Posted by kee23 View Post
and the output came out with drwx-----x. 6 david david 4096(I made that x permission to others. so that other user(mark) can access through the hardlink
What do you mean by access through the hardlink? Which hardlink?
mark will be able to cd to this directory but not read it, so that it is essentially inaccessible to mark.

Quote:
Originally Posted by kee23 View Post
but i still don't know how to enable others to travel through) and i was wondering how would the user group ownership david change to music, I guess i have to change mark's group ownsership to music as well. so that both can access the ~/project? using chgrp but i dont know what synthax.... haha

or is it usermod -aG music david? on the root? to make david music
I think chrism01 nailed it. What s/he describes is sometimes called "user private group scheme". Google for it and implement it.
 
  


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
by encrypted http access , to by pass proxy cdestiny Linux - Security 2 08-30-2010 01:05 PM
my FC9 requires User&Pass to access share!!!!! m.alshafay Linux - Newbie 1 09-25-2008 02:15 PM
windows share= no pass/ no access? hattrick Linux - Newbie 3 07-10-2008 06:01 AM
HD access disabled, can I enable it? JoeFisher57 Linux - Hardware 10 12-31-2007 08:37 PM
To enable Telnet access arraman Linux - General 5 09-14-2001 10:26 PM


All times are GMT -5. The time now is 12:36 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration