LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 09-19-2003, 12:23 PM   #1
aymbpc
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Rep: Reputation: 0
trying to share folder between 2 users


Hi
I would like to implement a scenario like this.I hope someonce can just guide me thru the process.
I have 2 different users xyz and abc.
Scenarion 1> The root user creates a directory and both abc and xyz users should be able to read write and execute from that directory.
Scenario 2 > user abc creates a directory. Later he himself decies to give read access to user xyz.
Scenario 3 > User xyz creates a directory. But later the ROOT decides to give access to that folder to user abc.
I am new to this linux world and learning a few things.
I would really appreciate help.
To be more specific i am using KDE.
Thank you
Ajay
 
Old 09-19-2003, 12:39 PM   #2
_kossak_
Member
 
Registered: Apr 2003
Location: Minde. Portugal
Distribution: DEBIAN
Posts: 87

Rep: Reputation: 15
First of all you should create a new group to those 2 users:

$ addgroup <name of the group> (let's say xpto)

then you should add the 2 users to the group:

$ adduser abc xpto
$ adduser xyz xpto

Create the directory:

$ mkdir shared_dir

Set the appropriate group owner:

$ chgrp xpto shared_dir

After that all you have to do is set the right permissions.

If you have further questions just post them!
 
Old 09-19-2003, 01:19 PM   #3
aymbpc
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Hi
Thanks for the reply.
But i had some scenarios in my mind.What you said was true. But what if a user had already created a folder and then due to some reasons he is not able to log access the folder.So as a root if I need to give rights to the user how do i do it.
Actually i am trying to view folders of all the users but I cannot
How can i do that.
Ajay
 
Old 09-19-2003, 02:35 PM   #4
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
Scenario 1> First, as _kossak_ says, it is easier if there is a group in which both users are members (again lets use xpto). Following a "mkdir <dir>" root does "chgrp xpto <dir>", and then "chmod g+rx <dir>". Just repetition here from previous post.

Scenario 2> user abc does a "chmod g+rx <dir>", assuming user xyz is in the group "owning" the directory. A "chmod 755 <dir>" would give access to all.

Scenario 3> Same thing again. Now root can ensure that user abc and xyz are in the same group.

You as user can only view the folders of others if they give you permission to do so. Depending on your setup (defaults vary across distribution -- saying you use KDE really means nothing), home directories are usually set 700, which means only the user (and root) has access. A user should be able to hide their files and directories from other users, if you want to see them, just ask for permission.
 
Old 09-21-2003, 05:32 PM   #5
aymbpc
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Hi I did as was told.
I first logged on as a root. I created a folder called testing. I already have two users named xyz and abc.I created a group called finance.
I added these two users to this group called finance and used chmod to change settings.
Then i logged on as a user xyz. But I cannot find the folder testing.
Where can it be and how do i use it.
Thank you
Ajay
 
Old 09-22-2003, 09:42 AM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 457

Rep: Reputation: 41
It helps to be more explicit with your questions. So, ...

Where did you make this directory testing. What is the full path of [ibtesting[/b]. Can you do a ls -ld <full path to testing> and list that, perhaps (as root)?

It is quite possible, given your scenario that you described, that testing was made in ~root (which is the home directory of the user root, and likely /root), which means the full path of your lost directory is /root/testing. If you do a ls -ld /root (assuming this is your ~root), you will likely see something like the following:

drwxr-x--- 17 root root 2048 Sep 8 04:21 /root

Note the drwxr-x---: This means it is a directory to which the user root can read and write and those in the group root can read. Therefore, even if you have created a directory within /root owned by group finance within it (with proper permissions), only root group members could see it.

Oh course, this is just a guess.
 
Old 09-22-2003, 08:04 PM   #7
aymbpc
LQ Newbie
 
Registered: Aug 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Hi
Thanks a lot for your help.That was the mistake i was making and after rectifying it i could do what i want.My both users can see the folder.However one thing what i observed was that when i save the folder as /testing instead of /root/testing i still cannot delete the folder testing as user.I can create and delete subfolders within testing but cannot delete testing.
What can be the reason behind this.
Thank you
Ajay
 
  


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
help quick! share folder vMatthews Linux - Networking 3 11-06-2005 11:57 AM
share a folder Alan87i Fedora 8 10-15-2005 05:47 PM
how can i share a file/folder common to all network users zameer_india Linux - Networking 1 09-30-2004 08:17 AM
how to share folder with users salahuddin_66 Linux - General 4 08-11-2004 11:43 AM
how can i share a folder/file? duker_d_cooker Linux - General 3 03-10-2004 07:35 PM

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

All times are GMT -5. The time now is 11:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration