Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a new Western Digital My Book Live 3TB NAS drive and I need to mount it on my ubunto 12.10 laptop.

I have created a directory '/NASRichardsWorkLaptop' (changed its ownership and group to myself, and given it 777 access) and mounted the NAS drive onto that using the following line in fstab:

//10.0.0.14/RichardsWorkLaptop /NASRichardsWorkLaptop cifs  defaults 0 0

However, as soon as it mounts '/NASRichardsWorkLaptop' becomes owned by root with 755 permissions and then only root can write to it. I need it to be read write to other users not just root. Any idea who I can make that happen?

I tried sudo chmod 777 /NASRichardsWorkLaptop/ but the permissions remain at 755 even after this command (if its mounted), so I'm stuck!

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

If you look at the documentation for the mount.cifs, you will notice a uid parameter (or guid)

  • uid=arg

    sets the uid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a username or a numeric uid. When not specified, the default is uid 0.

  • gid=arg

    sets the gid that will own all files or directories on the mounted filesystem when the server does not provide ownership information. It may be specified as either a groupname or a numeric gid. When not specified, the default is gid 0.

Adding the uid (or gid) of your user (or group) to the fstab line will grant you the needed rights.

share|improve this answer
    
Thanks that worked just fine. –  user118406 Jan 4 '13 at 10:56
    
@user118406 : Nice to have helped you. In the stackexchange world, a "thanks, that worked" is a +1 or an accepted answer ;) –  Cédric Julien Jan 4 '13 at 10:59
add comment

Your Answer

 
discard

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.