So I have a Windows machine and a number of folders that I want to share my network. I've no problem mounting the folders and they have the correct permissions set in Windows. I'm mounting them using the following  sudo mount.cifs '//WINDOWS_MACHINE/WINDOWS_FOLDER' /mnt/windows_folder/  -o uid-1000,gid=1000,username=$USRN,password=$PASS
122268
Have reinstalled Ubuntu on my web dev server. On the old one I had an smbfs share setup to access a share over the local network to other Ubuntu boxes. It was setup using the following and worked fine -   This time round I am using cifs-utils instead of smbfs, but I presume this is fine?  Upon reinstalling the server I have been having issues making the files writable. Its mounted ok, and when from my local machine I ls -l it shows me write permissions (although from my local user), but when I goto create or save over a file it gives me a no permissions error  Here is the line in my /etc/fstab. I had to make one change to be able to mount, and I added the ,sec=ntlmv2 option, without which I was getting mount error(13)  //192.168.0.40/webserver    /media/webserver        cifs    credentials=/root/.smbcredentials,sec=ntlmv2,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=1000,gid=1000 0 0   and my credentials file (unchanged from when it was previously working)  username=melon password=xxxxxxxxxxxx   How can I fix it so that I have write permissions on my mount?
84894
I have a machine running Ubuntu with Samba that I use to share stuff with my family's Windows machines in our local network.  Currently they access a share for movies/music/etc with one user.  I want to connect them to another share as a different user (for example, user "goytacaz").  When I try connecting to this new share, Windows gives me "Error 1219" and complains about multiple connections by the same user.  How do I get my machine to accept multiple connections by the same user?
45589
I don't have permission to chown the mounted directory /mnt/hdd. I am currently logged in as root. The ls -l output is:  rwxrwxrwx 1 root root 131072 Jan  1  1970 hdd   I am mounting it via fstab config:  /dev/sda1 /mnt/hdd exfat-fuse defaults 0 0   I am trying to assign the owner of that drive to www-data via that command:   root@owncloud:/mnt# chown -R www-data:www-data hdd   and it says I don't have permission to do that.  mount command output:  /dev/sda1 on /mnt/hdd type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
92461
I have a Samba share containing many folders like this:  share   - folderA   - folderB   - folderC   - folderD   There are around 20 users accessing those shares. Every user can have their individual access to some of the directories, for example Ben can access folderA and folderC, but not folderB and folderD. Jenny can access folderB and folderC, and so on.  I don't want the users to mount each folder they need. I want them to mount the folder "share" which contains all the subfolders. The access is then limited by setting the linux permissions.  I created a group for every subdirectory and added the users to those groups. The access control works perfectly for existing files. But whenever a user creates a file in a subdirectory, it is denied for every other user having the permission for read/write access in that directory. To solve this, I played around with the samba masking but can't get it to work.  My Samba conf looks like this:  guest ok = no  [global] workgroup = WORKGROUP security  = user encrypt passwords = yes  [Share] path        = /var/samba valid users = @everybody read only   = no writeable   = yes  [folderA] path        = /var/samba/folderA valid users = @users_folderA read only   = no writeable   = yes  create mask          = 770 directory mask       = 770 force directory mode = 770  force group = users_folderA  [folderB] path        = /var/samba/folderB valid users = @users_folderB read only   = no writeable   = yes  create mask          = 770 directory mask       = 770 force directory mode = 770  force group = users_folderB  [folderC] path        = /var/samba/folderC valid users = @users_folderC read only   = no writeable   = yes  create mask          = 770 directory mask       = 770 force directory mode = 770  force group = users_folderC  [folderD] path        = /var/samba/folderD valid users = @users_folderD read only   = no writeable   = yes  create mask          = 770 directory mask       = 770 force directory mode = 770  force group = users_folderD   So obviously every user is in the group everybody, so they can mount the share with the subdirectories. The access for each subdirectory is working perfectly fine. But whenever Ben creates a file in folderC, the file gets the file permissions -rwxr--r-- but it should be -rwxrwx---  I think the shares for the individual folders don't work at all because I tried to set writeable = no and read only = yes to test it. Restarted smbd and nmbd and remounted the network share (in Windows 10). The users were able to create files and modify their own.  This runs on a raspberry pi with raspbian. The hard drive with the files is formatted as ext4 and mounted via fstab.
103566
I have installed the ubuntu-server 16.04 and VBoxLinuxadditions and Samba  I am trying to share a folder from this server to my windows host machine. Now I can see this virtual server on my network but there are no shared folders on the server.    How do I make one through the command line?
94967
I have my CIFS setup in fstab and they are working as they are supposed to on boot. They mount as they should and work for a while. Out of nowhere it seems (could be after unlocking machine etc) I get "Host is down" error trying to access it. I have multiple and they are all down. They are also shared from the same server. At this time i check on a windows computer and an outdated 14.04 machine and they are up and functioning as they are supposed to. After clicking around on the shares in nautilus and getting repeat errors they will just start working again. To access a share that is "down" takes about 2-3min of randomly clicking different mounts and going back to the first one when automagically it shows the data in the mount point.  I do not have this problem on 14.04 machines that have not been updated in a while. All of those machines are fully functional and the CIFS never go "down". On 16.04 they were not a problem until more recently.  I have made sure to update every other day and have cleaned old linux headers (in hind sight i probably should have reverted). I do this because im begging for a fix to just appear but its been weeks of battling CIFS mounts without any solution.
21886
I wanted to change permissions on my external drives that are automounted however I have tried by sudo nautilus and then going to gui and permissions and changing it however it does not let me.  I ran the ls -l and get  drwx------ 1 xbmc xbmc   the gui shows below.  owner xbmc folder access create and delete files file access ---  Group xbmc folder access none file access ---  others folder access none file access ---   how can I change it so that everyone has permission to access the drive and ALL folders/files inside of it. I am trying to get plexmedia server running and I cant see my drives via the webpage manage to add it to my source to be able to stream my content.  I want to change the "others" access so that I can access all my drives on the /media path to get read and write for all my folders from anywhere.  you can see my drives that are mounted here (external drives are #18,19,20)
63494
A little script of mine on a mounted windows partition refuses to be executed directly (shebang is #!/bin/bash), but interestingly calling it with bash/sh works. The script is simply a collection of grep and sed commands.  The drive is mounted with full rights:  defaults,windows_names,rw,auto,user   Hence, for the the file got   -rwxrwxrwx 1 root root   for the file.  What's going on there?
17260
I am a little confused on the proper fstab entry for a samba share in Ubuntu 12.04     I can get the drive to mount manually by using:  sudo mount -t cifs //192.168.2.2/raid_drive /mnt/homeserver -o username=jon,password=password  So I tried putting this in fstab:  //192.168.2.2/raid_drive /mnt/homeserver cifs username=jon,password=password,iocharset=utf8,mode=0777,dir_mode=07‌​77 0 0  Which gives me this error in syslog:  kernel: [ 2217.925354] CIFS: Unknown mount option mode kernel: [ 2217.936345] CIFS VFS: default security mechanism requested.  The default security mechanism will be upgraded from ntlm to ntlmv2 in kernel release 3.3  This  says to use smbfs although I believe smbfs is deprecated?   What is a common fstab configuration for a samba share in Ubuntu 12.04?   EDIT:  Using the accepted answer below I was initially getting this error message (from dmesg):  [   45.520883] CIFS VFS: Error connecting to socket. Aborting operation [   45.520990] CIFS VFS: cifs_mount failed w/return code = -115   although it turns out this was due to network connectivity issues, and not related to improper fstab entry.
47509
I have a folder I want to share with a couple windows users on the network. I am using ubuntu 10.4 When I right click a folder I go to &quot;Sharing Options&quot; There are 3 check boxes. If I check the first 2 which are &quot;share this folder&quot; and &quot;Allow others to create and delete files in this folder&quot; I can now see this folder on the network from my pc. I cannot access it though, it asks for a username and password (I never set one up so I don't even know what credentials it wants.) I don't want to have to log in, I just want to be able to go right in. So If I check the third box, which is &quot;guest access&quot; I can now access the folder from my pc. But so can everyone else on the network. I just want myself and a couple other pc users on the network to be able to access it. I do not see anyplace where I can specify what users on the network have permission to access it? How do I do that?  update When I entered my user name and password for the linux machine, it gave me this error message:  \LINUX-SERVER\saga_repo is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions. Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.  I noticed that when type in my username it defaults to @MY-DOMAIN so I also tried myuser@linux-server but still got the same message. Also the domain administrator (who knows nothing about linux) told me that the linux machine is not a part of the domain (even though I can see it when I go to My Network Places from my windows machine). I don't know if that means anything. I also tried created a new user on ubuntu to try to log in with and got the same message. I tried to log in with my user and the new user from a workers machine and I couldn't get in from there either but I just got an &quot;access denied&quot; dialog everytime on his machine. Is there possibly another step I am missing?
4057
I'm running a SAMBA file store for our Windows users, and I'd like to automatically generate windows LNK files linking to other network shares that the user needs access to.  I've done quite a bit of googling and I can't find a way of creating windows links on Linux, or through Perl. I did find a perl module that looked promising in CPAN, but it will only run on Windows unfortunately.  If it's not possible to create .LNK files, perhaps there is an alternative solution people can suggest to allow the users to click on a file in one SAMBA store to be linked to a different SAMBA share?  Thanks,  Bart.
64111
I need to mount a ntfs partition and be able to use it with unix file system permissions. The problem is that, when I mount the partition using the following fstab entry, I cannot run chown and chmod successfully. It executes without error, but the file access rights are not changed.  PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7   /mnt/mounted_drive  ntfs-3g  defaults,umask=0022,uid=1000,gid=1000,errors=remount-ro,permissions 0 2   When I mount the partition without setting umask, uid, and gid I can use previously mentioned commands successfully.  PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7   /mnt/mounted_drive  ntfs-3g  defaults,errors=remount-ro,permissions 0 2   What shall I do to mount the partition properly?
3966
Just installed a fresh Ubuntu 16.04, and Samba. I want to share a drive with Windows machines, with anonymous users.  First thing I notice is the Samba configuration GUI (system-config-samba) is no longer available.  I forged ahead with the CLI and Nano, editing /etc/samba/smb.conf, using various bits of information from many other people struggling with the same issues.   I have it to the place where Windows machines can see the machine and the shared folder, but any attempt to open the share results in "Access Denied".  I want the share to be anonymous, but I also tried logging in using the Ubuntu user and password, and still "access denied".   Before I get into all the gory details after several hours of trying, what happened to the GUI config?  If it is just under another name, I'll try that first.  Update: It turns out there is an even easier way to configure sharing in 16.04 Unity.  Just right click on the folder to share and select "Local Network Share". From there, the Folder Sharing dialog opens to configure the sharing.    Unfortunately it doesn't work (remote user authentication always fails), but at least the interface is there.  I'll report back if and when I figure out more.
109920
I have a Ubuntu 14.04 server that will lock up after an undetermined amount of time when you attempt to tab-auto-complete the path of a CIFS share in the /mnt directory. I mount the share and it seems to work fine for a uncertain amount of time. I can do ls or run du on folders within the mounted share. Then I will go to tab out a folder path and my console locks up. I can start a new session but it will lock as soon as I try to mess with the mounted share; this even happens to other users if I have them try as well. I have no idea why this is happening? I've never seen this issue.
32929
My surface tablet is shared with a friend. She uses a separate account, with admin rights.  Being an admin, she is able to gain access to all my files. Even my OneDrive files.   I guess I could follow  to prevent this (it basically states that you'll need to disable access for the targeted administrator), but the same scenario would be present if I were to create another administrator account.  You could say "don't make her administrator", but I don't want to mess with her personal files as well.  Somehow this feels as a security flaw... or am I mistaken?  Is there any way to protect private files from "administrator eyes" by default?
119938
I want to share my home folder with my Windows machine, but I have no idea how to share the folder.  I can't find any up-to-date guides on Google, so how can I share my home directory?
50404
This is related to this issue:   I'm needing to run a program (InstallShield) as an elevated user, but this program also needs to access files located on a network share. Due to max path length (and legibility) issues, I really want to access these files using a mapped drive (rather than the much longer UNC path). However, due to the issue referenced above, the drive I mapped (via Windows Explorer) is not recognized.  Unfortunately, the recommended EnableLinkedConnections registry hack doesn't appear to work at all for me. Instead, I can get things to (temporarily) work by mapping the drive via an elevated command prompt using the following command: net use Z: \\machine\path /persistent:yes  The problem is this mapped drive does not actually persist (despite the /persistent:yes parameter) after reboot. Granted I can just quickly remap it via a script I manually run, but I imagine there must be a better way.  I don't know how to automatically run login scripts as the elevated user, otherwise I would try that. I'm also wondering why the net use command isn't persisting as expected.  Since it may be relevant, this is a Windows 8.1 virtual machine. Also, the network share I'm trying to persistently map and access is provided by VMware Workstation (via its optional Shared Folders feature).  I'm wondering if this is maybe a timing issue? (see )    Update  I managed to find a workaround, although I still don't have an answer for why the mapping doesn't persist in the first place.  Anyway, I set up a simple scheduled task in Windows to run a batch file on login. This batch file maps the network share to the desired drive letter (via the same net use command). I also ensured the Run with highest privileges task setting was checked. Voila! Elevated processes can now see and access my mapped drive, even after rebooting.