You are not logged in.

#1 2010-08-13 08:33:56

Flylow
Member
From: Switzerland
Registered: 2010-08-06
Posts: 24

[SOLVED] Mount NAS with writing permissions

I've got a MyBook World Edition NAS which i only use from time to time - so i decided to mount it manually.

To mount it convenient i've added the following to my /etc/fstab so i can mount it with "sudo mount /mnt/mybook":

//IPC/Public /mnt/mybook cifs users,noauto,noatime,ip=192.168.1.200,username=**********,password=**********,iocharset=utf8,file_mode=0777,dir_mode=0777

Mounting works well, but i don't get writing permissions.

Shouldn't "file_mode/dir_mode" do the trick?

Last edited by Flylow (2010-08-14 08:59:30)

Offline

#2 2010-08-13 08:43:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Mount NAS with writing permissions

1) Is the share exported with rwx?
2) Which user/group on your Linux box owners the mount point?

Just as a tip, use a credentials file you chmod to 700 in /root to keep the username/password private:

sudo mount -t cifs -o credentials=/root/.creds //nas/share /media/nas_share
# cat /root/.creds
username=nasuser
password=gHS53kO03h3zb

Last edited by graysky (2010-08-13 08:44:07)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2010-08-13 09:44:30

Flylow
Member
From: Switzerland
Registered: 2010-08-06
Posts: 24

Re: [SOLVED] Mount NAS with writing permissions

Thanks for the tip with the external .creds file :-)

1) Don't get the point - need some further explanation
2) Owner is root, i can change it to myself, but as soon the NAS gets mounted the owner changes to root

Does this maybe has to do with "sudo mount ..." Shouldn't I be able to mount without sudo since i added users to fstab?

Offline

#4 2010-08-13 20:20:02

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED] Mount NAS with writing permissions

Flylow wrote:

Thanks for the tip with the external .creds file :-)

1) Don't get the point - need some further explanation
2) Owner is root, i can change it to myself, but as soon the NAS gets mounted the owner changes to root

Does this maybe has to do with "sudo mount ..." Shouldn't I be able to mount without sudo since i added users to fstab?

Ah...

1) means is the share exported as read write execute from the NAS?
2) Since the owner is root:root that may explain your problem.  What are the permissions on the share once mounted?  I'm guessing 744 or 644?

Instead of the file_mode and dir_mode, try a uid,gid to the mount line and match them up to your user.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2010-08-14 08:59:06

Flylow
Member
From: Switzerland
Registered: 2010-08-06
Posts: 24

Re: [SOLVED] Mount NAS with writing permissions

Drive is 775 with group set to "1000"

So uid=1000 instead of file_mode/dir_mode did the trick for me.

Thanks graysky ;-)

Offline

Board footer

Powered by FluxBB