Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm having a problem with setting up samba share permissions on Ubuntu Server LTS. I've got two shares set up in the smb.conf file. The entries look like this:

[share]
comment = Ubuntu File Server Share
path = "insert real path name here"
browsable = yes
guest ok = no
read only = no
create mask = 0700
group = group1

[media]
comment = Ubuntu File Server Share
path = "insert real path name here"
hide unreadable = yes
browsable = yes
guest ok = no
read only = no
group = group2
create mask = 0700

In the file system I am the owner of all directories related to both of these shares. The [media] share is group-owned by group2, and the [share] is group-owned by group1. For both directories I have file permissions set at 771, where owner and group both have read, write, and execute, but guests have only execute. I have 3 users in the system: myself, my wife, and my mother. I belong to group1 and group2, as does my wife. My mother belongs only to group2. When I log into the server from my Windows desktop, my credentials work as expected. But if I use my wife's or my mother's, nothing works. They can log into the server, but when they click on one of the shared folders another log in screen is displayed asking for another username / password. This always fails and they are not allowed access to the folders.

I would like for my wife and I to have access to both of these folders while restricting access to other users. What am I missing here? I've tried fixing this for quite some time and I can't seem to get it figured out.

share|improve this question
add comment

2 Answers 2

I figured it out, I had two problems:

  • I didn't realize that a samba password needs to be assigned for each user
  • The line group = group1 needed to be changed to write list = @group1
share|improve this answer
    
There's no good way to answer an answer; if you have another question please ask it separately (you can link to this one for background) –  Michael Mrozek Nov 20 '12 at 23:46
add comment

First two places I check for samba-related (permission) errors are:-

/var/log/auth.log
/var/log/samba/*

Your create mask seems to only allow the owner to read, write and execute newly created files and folders. You probably want to add group read and execute permissions, by setting:

create mask = 0750

There is also the directory mask setting, which you would want to explicitly set to 0750 too.. The default is 0000.

directory mask = 0750
share|improve this answer
    
@CraigSmith The execute flag on directories allows one to enter it, but to list a directory content, you need to have read permission. –  peterph Nov 19 '12 at 12:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.