Super User is a question and answer site for computer enthusiasts and power users. 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 have FreeNAS server and domain-controller with Windows Server 2008. I use OpenSuse 11.4 and my Windows account have full access to FreeNAS CIFS share. I can connect through any filemanager with smb protocol support using smb://windows_user@freenas/share and I can read and write to any folder.

Now I'm trying to setup mount.cifs. Here is my string in /etc/fstab:

//freenas/share /mnt/Data cifs username=windows_user,password=windows_password,_netdev,uid=1000,gid=100 0 0 (where 1000 is my default linux user ID and 100 is 'users' group ID).

After mount -a I see folders from FreeNAS share but I can read/write them only as root user (not default user with ID = 1000).

Also ls -o says that folder's owner is 1000 but no read/write access.

I tried options like 'file_mode=0777' or 'dir_mode' or force uid or add user 1000 to root group - none of this worked. Any ideas what's wrong?

share|improve this question
up vote 4 down vote accepted

Solved by putting a line in fstab:

// /mnt/nasPublic cifs       username=username,password=password,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0


sudo mount -a
share|improve this answer
Many thanks! I tried all of this options (excluding iocharset) but maybe in wrong combination or not all of them together. Now it works! – ink Aug 9 '12 at 9:22
Thanks. It worked for me with rw,file_mode,dir_mode (didn't need nounix and iocharset). – schlamar Nov 15 '12 at 13:20

Hmmm, do you really want perm 777 on dir and files? You can specify your file and dir mode adn the uid and gid. To allow non-root mounting, try the "user" or "users" option for the mount (see man mount.cifs)


//myNAS/nasmedia /media/nasmedia cifs noauto,users,_netdev,credentials=/etc/.smbcredentials,iocharset=utf8,uid=1000,gid=1002,file_mode=0774,dir_mode=0775 0 0
share|improve this answer
Thanks for your answer but permissions restriction not necessary in my case. All other users connecting to this server via SMB from Windows, only I have Linux :) – ink Dec 4 '13 at 12:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .