Results 1 to 5 of 5

Thread: CIFS permissions issue with fstab but not mount command

  1. #1
    Join Date
    Nov 2016
    Beans
    63

    CIFS permissions issue with fstab but not mount command

    I want to mount a Windows share using CIFS on my Ubuntu 17.04 machine. If I use the mount command below it works fine, and I can access the Windows share:
    Code:
    sudo mount -t cifs //servername/sharename /home/myuser/mediafolder -o credentials=/home/myuser/.smbcredentials,dir_mode=0777,file_mode=0777
    If I attempt to make this permanent using the following entry in /etc/fstab I get a permissions error when I try to access the mount point at /home/myuser/mediafolder :
    Code:
    //servername/sharename /home/myuser/mediafolder cifs credentials=/home/myuser/.smbcredentials,gid=1000,uid=1000,iocharset=utf8,file_mode=0777,dir_mode=0 0 0
    What is the difference between the two options above, and why am I denied permissions with the 2nd approach?

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,934
    Distro
    Ubuntu

    Re: CIFS permissions issue with fstab but not mount command

    You might need to add the _netdev option to the fstab.
    _netdev delays mounting of the file system until after networking connection has been established.
    And yes, that's how it's suppose to be spelled with the underscore: _netdev
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Nov 2016
    Beans
    63

    Re: CIFS permissions issue with fstab but not mount command

    Quote Originally Posted by deadflowr View Post
    You might need to add the _netdev option to the fstab.
    _netdev delays mounting of the file system until after networking connection has been established.
    And yes, that's how it's suppose to be spelled with the underscore: _netdev
    Thanks for the suggestion. I just gave it a shot but still have the "Permission denied" error.

  4. #4
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    13,934
    Distro
    Ubuntu

    Re: CIFS permissions issue with fstab but not mount command

    Is the dir_mode=0 right?
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  5. #5
    Join Date
    Nov 2016
    Beans
    63

    Re: CIFS permissions issue with fstab but not mount command

    Quote Originally Posted by deadflowr View Post
    Is the dir_mode=0 right?
    Yes

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •