Grant Write Access to CIFS Mount As A Regular User

(0 votes, average 0 out of 5)

Often you may want a cifs/smbfs (Samba) mount on Linux to be writeable by normal users. If it is the case that you can write to the mounted filesystem as root but not as a normal user (Permission Denied), then you may need to adjust your mount options in /etc/fstab. The key mount options are file_mode and dir_mode, which override the default file and directory permissions for Samba shares. By manually setting these values, you can grant read/write access to normal users on the local machine:

 

/etc/fstab
//youserver/sharename /mnt/mountpoint cifs username=yourusername,password=yourpassword,file_mode=0664,dir_mode=0775

 

File mode 664 means that the owner and members of the group can read and write while others can only read. This allows local users to read and write to the Samba/CIFS share.

 

Partner Links:
Last Updated on Wednesday, 21 September 2011 12:29  
Related Articles

» How to Create Personal Folders in Microsoft Outlook 2010

Personal folders are a good way to store email on a hard drive such that they are not affected by an exchange server's retention policy.  Creating a personal folder is Outlook 2010 is easy, but not straight forward.  Here's how to do it:First, open Outlook and navigate to the File tab.  Click the "Account Settings" button, and choose the "Account Settings..." option the dropdown menu.Navigate to the "Data Files" tab, and click the "Add" button:You will see a prompt to save a new...

» How to Enable Playback of MKV Files in Windows 7 Media Center

Back up your registry and create a system restore point. This is in case any problems arise in the process. the Windows 7 version of the codec pack. (The actual download is hosted by Major Geeks). When the download completes, install the codec pack.If you are running the 64-bit version of Windows 7, download and install those components as well. the MKV Registry Hack for your version of Windows 7 (32 or 64 bit).Double click the downloaded .reg file and allow the process to complete. This will...

» Combine MP4/M4V Files in Linux/Ubuntu

You may want to combine multiple mp4/m4v video files into one continuous video. In order to do this, you need to install the gpac library of programs onto Ubuntu. Open up Terminal and run:sudo apt-get install gpac This will install the gpac library. One of the programs included with it is MP4Box, which you can use to concatenate the video files. If you are using 64 bit Linux or get an error like MP4Box: error while loading shared libraries: libgpac.so: cannot open shared object file: No such...