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 Fix the PS2 Disc Read Error

Although the Playstation 2 is a system well-known for it's longevity and durability, the fact that it is over a decade old means that it inevitably will have a few issues.  The most common of which is the infamous disc read error.  This is characterized by entering a disc into the PS2, but instead of booting in the game, an error message comes up saying the disc could not be read or the disc was not recognized. There are several ways to fix it, listed below in order of least to most...

» How to Show Filename in Title Bar in Emacs

Adding the following snippet into your .emacs file (typically located in your home directory) will cause the filename of the current buffer to appear in the title bar.  This is a quick fix that can make managing multiple emacs windows much easier. ;; Show filename in title bar(setq frame-title-format "%b - Emacs") 

» 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...