search
top

Mounting a NAS read / write on Fedora 12 +

Recently upgraded my NAS and had an issue where I could mount the device on Fedora but would only in Read Only mode.  For my purpose I was mounting with a script to my home directory but wanted to add it to a directory called share on my root in read / write mode by adding it to /etc/fstab after figuring out why I could not write to the directory.

Part of the solution is to add UID and GID of my id, username and password for connecting to the NAS and the rw flag. Since I wanted to mount from /etc/fstab I created a directory off the root called /share and changed ownership to my id.

$ sudo mkdir /share

$ sudo chown -R fooman:fooman /share

Next is to create the /etc/fstab entry

//192.168.1.100/share /home/fooman/share cifs rw,username=fooman,password=foo,UID=500,GID=500 0 0

Finally mount it

$ sudo mount /share

If you want to just have a command or a script to mount it to your home directory  just create one with the below syntax after creating a share directory in your home directory.

$ sudo mount -t cifs //192.168.1.100/share ~/share -o rw,user=fooman,password=foo,UID=500,GID=500

Hope this helps you as it helped me !!!

Leave a Reply

Your email address will not be published. Required fields are marked *

top