Solved

Setting permissions on CIFS mount....

Posted on 2009-04-08
3
796 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server Room Construction 4 51
URL question - What is port 8888? 5 107
need a help to fix one if else shell script issue 6 33
Bitcoin mining - Is it possible? 6 92
If you're not part of the solution, you're part of the problem.   Tips on how to secure IoT devices, even the dumbest ones, so they can't be used as part of a DDoS botnet.  Use PRTG Network Monitor as one of the building blocks, to detect unusual…
Determining the an SCCM package name from the Package ID
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

738 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