Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 mounted a windows share, But only root have write permissions..

I need to change that to my user(einar) so my programs can download and shave stuff to my windows share.

commands I've have used to mount:

sudo mkdir /mnt/ussenterprise
sudo gedit /etc/fstab
//servername/sharename  /mnt/ussenterprise  cifs  username=msusername,password=mspassword,iocharset=utf8,sec=ntlm  0  0
sudo mount -a

yes I have read access to everything in the mounted share, but only root gave write..

I've tried: sudo chown einar:einar /mnt/ussenterprise, and sudo chown einar /mnt/ussenterprise

I get; permissions denied

what to do?


Changed my fstab to:

//server/share  /media/share  cifs  username=msusername,password=mspassword,uid=1000,gid=1000  0  0
share|improve this question

Try these options:


(definitions of noperm and nosetuids are found in the mount.cifs manpage)

Also, think about using a credentials file instead of having your name/pw in the clear:


since fstab can be read by all.

share|improve this answer
did not change anything, stil only read – starR Dec 20 '13 at 17:42

Your entry in fstab is creating the mount point in /mnt. Using the /mnt directory should only work if the drive is a local volume rather than a network share or removable device.

Edit your fstab entry to:

//servername/sharename  /media/ussenterprise  cifs  username=msusername,password=mspassword,umask=002,uid=1000,gid=1000,iocharset=utf8,sec=ntlm  0  0

This assumes that your uid and gid are 1000 which is the first default user and group IDs. Then use:

sudo umount /media/ussenterprise
sudo mkdir /media/ussenterprise
sudo chown einar:einar /media/ussenterprise
sudo chmod 755 /media/ussenterprise
mount -a

This should mount the share with your user ID and permissions set to read/write.

share|improve this answer
sorry the entry in fstab was only a copy/paste of a guid, i have used "mnt/ussenterprise" .. – starR Dec 20 '13 at 17:26
Change your fstab to make the mount in /media and run the commands I listed. I have a network cifs share mounted exactly like this. – douggro Dec 20 '13 at 17:33
Still only have read :( – starR Dec 20 '13 at 17:40
when i run the mount command, i lose all permissions to root – starR Dec 20 '13 at 17:43
What is the output of ls -l /media ? – douggro Dec 20 '13 at 17:44
up vote 0 down vote accepted


Changed my fstab to:

//server/share /media/share cifs username=msusername,password=mspassword,uid=1000,gid=1000 0 0

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.