Of course, you can mount a windows network folder quite easily in Linux/Ubuntu.

sudo mount -t cifs // /media/USER/DIR -o username=USERNAME,password=PASWORD

Is there any way to grant non-root users write access to this mounted folder without creating an entry in /etc/fstab?

Background: I'd like to occasionally mount my folders from another computer to do some work on the files. As there are different folders all the time, it does not seem sensible to create an fstab entry every time. And as I'd like to work on the GUI, I cannot easily work with root permissions. The file permissions set for the mount folder, of course, are ignored after having the ressource mounted. Any ideas? Or is it simply not possible?

  • Arg! I just could have browsed the network, using the Ubuntu desktop... Well. The question remains: What is the trick to grant a common user write access to a mounted network drive without using fstab? – BurninLeo Nov 23 '14 at 20:53

So you don't mind sudo mount from a terminal, but you want your non-admin user(s) to have RW access?

Do once:

sudo mkdir /media/cifs_temp
chmod a+rwx /media/cifs_temp

then use a slightly modified version of your mount command:

sudo mount -t cifs // /media/cifs_temp -o username=USERNAME,password=PASSWORD

and that should do it!

  • (currently travelling, without access to my desktop and cifs, so let me know if something doesn't work) – Fabby Nov 23 '14 at 23:35
  • 1
    Except for the changed folder name, I do not see the modification?! I had already given all users full r/w-access to the mount folder - but, these permissions "change" as soon as something is mounted there. So, if I did not miss the obvious, this solution does not work :( – BurninLeo Nov 24 '14 at 13:48
  • Btw: regarding the sudo and the non-admin users. I can easily have a sudo on the terminal, but when I'm working on the Desktop/GUI, it's not so easy becoming superuser for a while. – BurninLeo Nov 24 '14 at 13:50
  • Yes, that was it: Changing the rights to "all" and Read+Write+Execute... – Fabby Nov 24 '14 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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