Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to setup a samba server to share data among clients via cifs. As a test, I mounted the samba share on the same machine and tried to access the contents of the directory. The mount command was:

mount -t cifs -o username=sthomaso,workgroup=WORKGROUP //server/scratch /mnt/server/scratch

...which worked fine after entering the password. Although I can cd /mnt/server/scratch, when I try to list the contents of the directory with ls, I get error ls: reading directory .: Permission denied.

On the server, my /etc/samba/smb.conf is:

    security = user
    workgroup = WORKGROUP

    writeable = yes

    path = /var/scratch
    valid users = @feausers
    writeable = yes

User "sthomaso" was added to tdbsam with command:

pdbedit -a -u sthomaso

User "sthomaso" is in group "feausers", verified with the "groups sthomaso" command.

/bin/ls -lF /var | grep scratch shows:

drwxrwx--T. 2 root feausers 4096 Jun 14 14:40 scratch/

/var/log/samba/log.smbd contains validation of a successful connection in line:

<snip> smbd/service.c:1070(make_connection_snum)
<snip> connect to service scratch initially as user sthomaso (uid=500, gid=501) (pid 99999)

So it looks like I am successfully mounting the share, but why can't I read the directory and access the files?

share|improve this question
Forgot to mention...this is RHEL 6.1 – scott8035 Jun 15 '11 at 18:27

FYI, I got some help from Red Hat...the problem was SELinux restricting permissions. I don't need the control offered by SELinux, so I just disabled it by editing /etc/selinux/config and restarting.

share|improve this answer

Your Answer


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.