Samba Permissions Question


Results 1 to 10 of 10

Thread: Samba Permissions Question

  1. #1
    Join Date
    Jun 2003
    Location
    People's Republic of North America (Former United States)
    Posts
    849

    Samba Permissions Question

    I have a share on a Windows 2003 file server that I am mounting on my Linux Oracle servers. On the Windows side, the share is named datadrops. On the Linux side, I am mounting it with the command mount -t cifs //192.168.111.16/datadrops /u04/oradata -o username=oracle,password=<omitted for security.> Now, before I mounted the share, the oradata directory I chmoded to 755. However, after I mount the share, I do an ls -l and oradata looks like it's back to 777. Is there a way to make this reflect 755 again?
    I equivocate, therefore I might be.

    My Linux/Unix Boxes:
    Home: Slackware 10, CentOS 5.3, RHEL 5, Ubuntu Workstation 9.10, Work: RHEL 5, CentOS 5

  2. #2
    Join Date
    Sep 1999
    Location
    Cambridge, UK
    Posts
    509
    Try the file_mode and dir_mode options to mount.cifs.

  3. #3
    Join Date
    Jun 2003
    Location
    People's Republic of North America (Former United States)
    Posts
    849
    Try the file_mode and dir_mode options to mount.cifs.
    I'm not sure how to do that. Can you give me an example? Thanks!
    I equivocate, therefore I might be.

    My Linux/Unix Boxes:
    Home: Slackware 10, CentOS 5.3, RHEL 5, Ubuntu Workstation 9.10, Work: RHEL 5, CentOS 5

  4. #4
    Join Date
    Sep 1999
    Location
    Cambridge, UK
    Posts
    509
    Same way as you are already passing the username and password: with -o.

  5. #5
    Join Date
    Oct 2000
    Location
    Sweden
    Posts
    494
    This happens because it's an samba-share, unix permissions doesn't apply.
    The mountpoint will always be 777, you control access the way you've already done it with the "-o username= "etc
    In pingvino veritas!

  6. #6
    Join Date
    Jun 2003
    Location
    People's Republic of North America (Former United States)
    Posts
    849
    Same way as you are already passing the username and password: with -o.
    What I mean is, would I have to pass it any parameters? Sorry, this CIFS way of doing things is new to me. I'm used to smbclient.
    I equivocate, therefore I might be.

    My Linux/Unix Boxes:
    Home: Slackware 10, CentOS 5.3, RHEL 5, Ubuntu Workstation 9.10, Work: RHEL 5, CentOS 5

  7. #7
    Join Date
    Sep 1999
    Location
    Cambridge, UK
    Posts
    509
    The mount.cifs manpage says this:
    file_mode=arg
    If the server does not support the CIFS Unix extensions this overrides the default file mode.

    dir_mode=arg
    If the server does not support the CIFS Unix extensions this overrides the default mode for directories.
    So what you have to do is, for example,
    Code:
    mount -t cifs //192.168.111.16/datadrops /u04/oradata -o username=oracle,password=XXX,file_mode=0600,dir_mode=0700
    As an aside, you may also be interested in the credentials option.

  8. #8
    Join Date
    Jun 2003
    Location
    People's Republic of North America (Former United States)
    Posts
    849
    Furrycat,

    I'll give it a try and post the results. Thanks!
    I equivocate, therefore I might be.

    My Linux/Unix Boxes:
    Home: Slackware 10, CentOS 5.3, RHEL 5, Ubuntu Workstation 9.10, Work: RHEL 5, CentOS 5

  9. #9
    Join Date
    Jun 2003
    Location
    People's Republic of North America (Former United States)
    Posts
    849
    Update - This turned out to be nothing more than a DBA afraid of Samba. He was reading stuff about Samba and just spouting off. He hates Windows but he's not the least bit pragmatic. We all hate Windows but if I have 6 TBs free on a Windows file server, why not use it?
    I equivocate, therefore I might be.

    My Linux/Unix Boxes:
    Home: Slackware 10, CentOS 5.3, RHEL 5, Ubuntu Workstation 9.10, Work: RHEL 5, CentOS 5

  10. #10
    Join Date
    Jun 2010
    Posts
    1
    Yes, this could happens because of it's an samba share, unix permission not apply here.

Posting Permissions

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