[Samba] ARGH... once again samba causes "permission" errors.

Moray Henderson Moray.Henderson at ict-software.org
Tue Jun 1 02:36:38 MDT 2010

Jeff Wiegley wrote:
>I've been doing unix sys. admin for nearly 20 years and yet EVERY
>time I have to setup samba I have configuration problems.
>Before we start let's clear up some common misunderstandings: I have
>googled for the answer. I have spent the last six hours doing so and
>various "suggestions". Most of these suggestions point to solutions
>involving chown or chmod.  These are not the problems (or I will be
>very surprised).
># cat /etc/samba/smb.conf
>         workgroup = CYTE.COM
>         server string = CyteNAS
>         netbios name = NAS
>         hosts allow = 127., 10.0.10.
>         comment = NAS
>         path = /mnt/nas
>         force user = nas
>         force group = nas
>         read only = No
># cat /etc/samba/smbpasswd
># grep nas /etc/passwd
># grep nas /etc/group
># ls -al /mnt/nas
>total 16
>drwxrwxrwx 2 nas  nas  4096 May 28 17:01 .
>drwxrwxrwx 3 root root 4096 May 28 15:04 ..
>So before you tell me about "permission" problems please note the
>   1) The permissions on all the files is 777... EVERYBODY can do
>   2) samba IS configured to force the user and group to the owner of
>the share
>       path anyways.
>   3) The group and user exist and they have their passwords configured
>        correctly.
>I can map the share on my Windows 7 workstation. But any attempt to
>create anything yields a pop-up window that says:
>"You need permission to perform this action"
>                               nas(\\NAS)
>                               Space free: 89.7 GB
>                               Total size: 97.0 GB
>Why am I getting ANY permission problems??? Frankly. I don't think it
>a permission problem. (I set log level to 10; the output is long so I
>include it because I looked through it and didn't see any errors
>or any mention of permission denied.)
>It gets worse. a 90GB NAS storage is pretty useless. The NAS is
>a 6TB Raid5 array with an XFS filesystem. But if I actually mount
># /etc/init.d/smb stop
># mount /mnt/nas
># ls -al /mnt/nas
>total 8
>drwxrwxrwx 2 nas  nas     6 May 28 18:11 .
>drwxrwxrwx 3 root root 4096 May 28 15:04 ..
>see... no difference in permissions or ownership but now it is a mount
>Now I can't even map the samba share at all. All I get is a window
>that says:
>    "Attemping to connect to \\NAS\nas"
>           (Cancel)
>And it never seems to go away.
>and yes, under both cases I can simply login as the user nas via
>ssh and touch/mkdir or do anything I want and the files get created
>just fine. Frankly I think this is another case of Windows presenting
>the user with a misleading diagnostic "Permission" problem when
>something much more fundamental is going wrong with Samba.
>Please help.
>- Jeff

Is this NAS thing running SELinux, by any chance?  SELinux can give you
a whole set of extra permissions problems even when the standard
permissions look wide open.  Try "ls -Z /mnt/nas".

"To err is human.  To purr, feline"

More information about the samba mailing list