Solved

Setting permissions on CIFS mount....

Posted on 2009-04-08
3
793 Views
Last Modified: 2013-12-09
I am using mount.cifs in CentOS to connect to a windows share. I have the credentials for the cifs share in a separate file on the linux box. That share mounts fine using the credentials....I can read and write. What I want to do is change the permissions on the mount point (/mnt/share1) so that only root and users in the root group can access the share. Right now any user can get into the share. Is there an easy way to do this? chown does not work....
0
Comment
Question by:concordit
3 Comments
 
LVL 7

Accepted Solution

by:
Morne Lategan earned 500 total points
ID: 24104674
Have a look at this page:

http://www.samba.org/samba/docs/man/manpages/mount.cifs.8.html

mount -t cifs //machine/share /mnt/mountpoint -ouser=windowsuser,password=windowspassword,uid=localowner,gid=localgroup,file_mode=770,dir_mode=770

Will cause localowner and localgroup to be able to read and write to it, but no-one else.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question