-
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
-
Try the file_mode and dir_mode options to mount.cifs.
-
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
-
Same way as you are already passing the username and password: with -o.
-
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!
-
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
-
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.
-
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
-
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
-
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
-
Forum Rules
|
|