LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2017, 06:19 PM   #1
Slacker133701
LQ Newbie
 
Registered: Jul 2016
Distribution: Slackware64 14.2
Posts: 12

Rep: Reputation: Disabled
Question options in /etc/fstab not working correctly


Hello,

*EDIT* I forgot to mention I am using Linux Mint 18.1 Cinnamon.

This is the entry I am trying to add to my fstab however it only mounts as read only.... I tried putting "defaults" in different places but it is not working.

The mount /media/shares/music was has all permissions "777".

Not sure why this wont work its driving me crazy!!!!

//192.168.1.80/music /media/shares/music cifs defaults,credentials=/home/mike/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

Thank you in advance,

Slacker133701
 
Old 06-11-2017, 12:17 AM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,237

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
You could specify uid= and gid= explicitly like this

Code:
//192.168.1.80/music /media/shares/music cifs defaults,credentials=/home/mike/.smbcredentials,uid=1001,gid=1001,iocharset=utf8,sec=ntlm 0 0
Use the 'id' command to get the applicable values for your user
 
Old 06-11-2017, 12:25 AM   #3
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,237

Rep: Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006Reputation: 1006
If you need r/w access for all users, you could use file_mode=0770 and dir_mode=0770 instead. (This is required because the share is mounted as root.)
Code:
//192.168.1.80/music /media/shares/music cifs defaults,credentials=/home/mike/.smbcredentials,file_mode=0770,dir_mode=0770,iocharset=utf8,sec=ntlm 0 0

Last edited by ferrari; 06-11-2017 at 12:26 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Define Optical disk devices correctly in /etc/fstab (Fedora) wombat53 Linux - Hardware 6 07-30-2008 07:41 AM
fstab options ygloo Linux - General 4 08-28-2006 05:31 PM
fstab - mount options merchtemeagle Linux - General 3 03-09-2006 06:00 PM
Editing fstab correctly bernstein Linux - Newbie 8 04-04-2005 01:44 PM
fstab options durden2.0 Linux - Newbie 7 01-19-2004 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration