Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File / Directory permissions for users or groups

Status
Not open for further replies.

JustKIDn

MIS
May 6, 2002
386
US
Hi,

I'm trying to give permissions to a directory and all the files in the directory to a user.

I've created a new group in case I want to give more users the same access. And I added the user to the group.

The directory and all the files already have a group associated to them. I don't want to change the group owner.

How do I add the new group and keep the existing group?

I know with Netware and Windoz you can add many users and groups to share the same data. How do you do that with Linux?

Thanx for your help!

tgus

____________________________
Families can be together forever...
 
You can't do this in Linux or Unix, but certain software will allow you to do this. How are your users going to connect to the server?

ChrisP
 
I'm using Samba.

So a user maps a drive from windoz to the Linux server.

Is that what you mean?


tgus

____________________________
Families can be together forever...
 
Take a look at the smb.conf (5) man page, specifically the "read list" and "write list" parameters.


If you want to specify a group in the list, use @groupname.

Here's an example share...

[testshare]
comment = Test Samba Share
path = /tmp/test
create mask = 2660
directory mask = 2770
read list = jdoe, panderson
write list = admin, root, @staff



ChrisP
 
Thanks Chris,

That really looked like it would do the job.

I don't know why it didn't. Here is a copy of the section I've been testing with.
Code:
[etc]
	comment = Sharing /etc
	path = /etc
        create mask = 2660
        directory mask = 2770
        write list = tammy, @users
	read only = No
	browseable = yes
	writable = Yes
	guest ok = Yes

As you can see I've tried a lot of things. I can see the directory and the files in it. I can't open files in /etc but I can in other directories like /etc/samba.d/smb.conf. But I can't make changes and save them.

I've been using samba for quite a while now. But I'm just testing here because I want to add another drive and use it for a storage area for file and print. So I want to get the bugs out of this step before I add the drive. Which could open another set of cascading events!

I realize this isn't the samba forum. But as long as we already started here, If you have any answers, I'm listening!

Thanks!

tgus

____________________________
Families can be together forever...
 
This is probably due to the Unix permissions set in /etc/. Usually only root has write access in /etc/.

Set up a test share like this and see if it works.

mkdir /home/test
chown tammy.users /home/test

In the smb.conf, set up a share for the newly created directory...

[test]
comment = Test share
path = /home/test
write list = tammy, @users
read only = No
browseable = yes
writable = Yes
guest ok = Yes


ChrisP
 
Ok,

That seems to be working.

I thought about the possibility of it being an /etc thing just as I was posting last night.

I didn't realize that only root could write to /etc.

Thanks again!

tgus

____________________________
Families can be together forever...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top