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 10-09-2013, 12:41 PM   #1
fallere
LQ Newbie
 
Registered: Oct 2013
Distribution: Kali, Ubuntu 12.04, Zentyal 3.0
Posts: 1

Rep: Reputation: 0
Samba 3.6.3 permissions acting strange.


I have a "little server" running Ubuntu 12.04 and Samba 3.6.3.

Code:
[global]
	log file = /var/log/samba/log.%m
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	obey pam restrictions = yes
	map to guest = bad user
	encrypt passwords = true
	passwd program = /usr/bin/passwd %u
	passdb backend = tdbsam
	dns proxy = no
	netbios name = city fake
	server string = %h server (Samba, Ubuntu)
	unix password sync = yes
	os level = 20
	syslog = 0
	panic action = /usr/share/samba/panic-action %d
	usershare allow guests = yes
	max log size = 1000
	pam password change = yes


[Candeloro]
        comment = Miyako
        writeable = yes
        valid users = @Candeloro
        create mode = 770
        path = /home/Candeloro
        directory mode = 770
 
[Ophelia]
        comment = Kafuka
        writeable = yes
        valid users = @Ophelia
        create mode = 770
        path = /home/Ophelia
        directory mode = 770
 
[Kyubey]
        comment = Maayoi
        writeable = yes
        valid users = @Kyubey
        create mode = 770
        path = /home/Kyubey
        directory mode = 770
 
[Oktavia]
        comment = Karen
        writeable = yes
        valid users = @Oktavia
        create mode = 770
        path = /home/Oktavia
        directory mode = 770
 
[Homulilly]
        comment = Hitagi
        valid users = @Homulilly
        writeable = yes
        create mode = 770
        path = /home/Homulilly
        directory mode = 770


[Kriemhild]
	writeable = yes
	path = /home/Kriemhild
	force group = Kriemhild
	valid users = @Kriemhild
	create mode = 770
	directory mode = 770
	directory mask = 0777
	create mask = 0777
My shares:
Code:
drwxr-xr-x 24 Kyouko    Kyouko    4096 Oct  9 09:19 Kyouko
drwxr-xr-x 23 Homura    Homura    4096 Oct  3 09:16 Homura
drwxrws---  2 root      Kyubey    4096 Oct  3 11:44 Kyubey
drwxrws---  2 root      Oktavia   4096 Oct  3 09:56 Oktavia
drwxrws---  4 root      Candeloro 4096 Oct  3 09:04 Candeloro
drwxrws---  2 root      Ophelia   4096 Oct  3 11:43 Ophelia
drwxrwx---  3 root      Kriemhild 4096 Oct  9 09:22 Kriemhild
drwxr-xr-x 21 Sayaka    Sayaka    4096 Oct  3 08:35 Sayaka
drwxrws---  3 root      Homulilly 4096 Oct  3 09:13 Homulilly
drwxr-xr-x 23 Madoka    Madoka    4096 Oct  3 09:24 Madoka
drwxr-xr-x 28 Mami      Mami      4096 Oct  9 09:19 Mami
My users (Mami, Madoka, Homura) can use Candeloro, Ophelia, Kyubey, Oktavia, and Homulilly. My users (Sayaka and Kyouko) can only use Candeloro, Ophelia, and Oktavia. I need them all to use kriemhild, but they cannot. For the other shares I ran
Code:
 sudo chmod g+s {share}
and they worked, but I am looking for a way to not have to run that every time I make a new share. As it stands, I can have my users connect to the shares they are allowed to from windows and use them like they should, but if I make a file on ubuntu with their account the group changes from [share] to [user].

My question, after all of this insane rambling is this, is there a way to make my shares forge their group permission on everything made in it through samba or am I forced to use chmod?
 
Old 10-10-2013, 12:54 AM   #2
CodeFreaker
LQ Newbie
 
Registered: Feb 2010
Posts: 27

Rep: Reputation: 12
Cool

Quote:
Originally Posted by fallere View Post
I have a "little server" running Ubuntu 12.04 and Samba 3.6.3.

Code:
[global]
	log file = /var/log/samba/log.%m
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	obey pam restrictions = yes
	map to guest = bad user
	encrypt passwords = true
	passwd program = /usr/bin/passwd %u
	passdb backend = tdbsam
	dns proxy = no
	netbios name = city fake
	server string = %h server (Samba, Ubuntu)
	unix password sync = yes
	os level = 20
	syslog = 0
	panic action = /usr/share/samba/panic-action %d
	usershare allow guests = yes
	max log size = 1000
	pam password change = yes


[Candeloro]
        comment = Miyako
        writeable = yes
        valid users = @Candeloro
        create mode = 770
        path = /home/Candeloro
        directory mode = 770
 
[Ophelia]
        comment = Kafuka
        writeable = yes
        valid users = @Ophelia
        create mode = 770
        path = /home/Ophelia
        directory mode = 770
 
[Kyubey]
        comment = Maayoi
        writeable = yes
        valid users = @Kyubey
        create mode = 770
        path = /home/Kyubey
        directory mode = 770
 
[Oktavia]
        comment = Karen
        writeable = yes
        valid users = @Oktavia
        create mode = 770
        path = /home/Oktavia
        directory mode = 770
 
[Homulilly]
        comment = Hitagi
        valid users = @Homulilly
        writeable = yes
        create mode = 770
        path = /home/Homulilly
        directory mode = 770


[Kriemhild]
	writeable = yes
	path = /home/Kriemhild
	force group = Kriemhild
	valid users = @Kriemhild
	create mode = 770
	directory mode = 770
	directory mask = 0777
	create mask = 0777
My shares:
Code:
drwxr-xr-x 24 Kyouko    Kyouko    4096 Oct  9 09:19 Kyouko
drwxr-xr-x 23 Homura    Homura    4096 Oct  3 09:16 Homura
drwxrws---  2 root      Kyubey    4096 Oct  3 11:44 Kyubey
drwxrws---  2 root      Oktavia   4096 Oct  3 09:56 Oktavia
drwxrws---  4 root      Candeloro 4096 Oct  3 09:04 Candeloro
drwxrws---  2 root      Ophelia   4096 Oct  3 11:43 Ophelia
drwxrwx---  3 root      Kriemhild 4096 Oct  9 09:22 Kriemhild
drwxr-xr-x 21 Sayaka    Sayaka    4096 Oct  3 08:35 Sayaka
drwxrws---  3 root      Homulilly 4096 Oct  3 09:13 Homulilly
drwxr-xr-x 23 Madoka    Madoka    4096 Oct  3 09:24 Madoka
drwxr-xr-x 28 Mami      Mami      4096 Oct  9 09:19 Mami
My users (Mami, Madoka, Homura) can use Candeloro, Ophelia, Kyubey, Oktavia, and Homulilly. My users (Sayaka and Kyouko) can only use Candeloro, Ophelia, and Oktavia. I need them all to use kriemhild, but they cannot. For the other shares I ran
Code:
 sudo chmod g+s {share}
and they worked, but I am looking for a way to not have to run that every time I make a new share. As it stands, I can have my users connect to the shares they are allowed to from windows and use them like they should, but if I make a file on ubuntu with their account the group changes from [share] to [user].

My question, after all of this insane rambling is this, is there a way to make my shares forge their group permission on everything made in it through samba or am I forced to use chmod?

How about selinux? have you set up selinux type for these shares?

run setenforce 0 and now check if you can access then this might be a problem of selinux permissions ..

run

chcon -R -t samba_share_t /you share name

 
  


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
Samba acting totally strange: No logging, no errors, but no access browny_amiga Linux - General 2 01-25-2010 09:37 AM
SAMBA - strange permissions issue with files copied from a DVD taylorkh Linux - Server 5 12-01-2009 06:55 PM
Strange problem with local permissions on WinXP using a Samba PDC with LDAP backend qtac Linux - Networking 2 09-09-2009 12:33 AM
Wacom acting strange Yoda3114 Ubuntu 9 03-29-2007 03:52 AM
directory permissions acting strange. mushmaster Linux - Software 1 02-12-2006 08:33 PM


All times are GMT -5. The time now is 10:28 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