I am trying to convert this command line:

sudo mount -t cifs // /media/NAS -o username=x,password=y,dir_mode=0777,file_mode=0777

Into /etc/fstab entry, but it keeps mounting without 777 level of privileges.

So far I have this:

// /media/NAS cifs uid=root,gid=root,username=x,password=y,0 0
  • A search on fstab entry for Windows share will yield some ideas. One that stood out to me was this answer which resulted from discovery that mount-cifs may need to be installed? Doesn't seem likely in your case as apparently you're able to mount, but with wrong privileges, but I've learned that logic isn't always the best guide in fstab entries. – Seamus May 13 '19 at 17:39

You wrote:

// /media/NAS cifs uid=root,gid=root,username=x,password=y,0 0

But you want to:

// /media/NAS cifs username=x,password=y,dir_mode=0777,file_mode=0777 0 0

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.