Announcement

Collapse
No announcement yet.

File Sharing

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    File Sharing

    I have just installed Kubuntu 14.04.3, so far I'm doing OK. Google and I got the USB discs to automount in the end and I can remotely control it with the Remote Desktop tool. However my searches are just taking me round in circles when it comes to file sharing - I want to share folders on the Kubuntu machine so that a Windows client can write in them without a password.

    I've installed Samba. If I go to the 'Share' tab on the folder properties I can enable 'Share with Samba' and 'Allow Guests'. I have also set Everyone to Full Control in the section below. I still have no access from a Windows 10 client. I can see the share but not open the folder.

    I've tried various versions of an addition to smb.conf suggested by different people but none of them works. Whatever I do the Windows client says "Windows cannot access..." the folder I'm trying to share.
    I've tried searching and really only found things which made it worse or no different. Maybe I'm just asking the wrong question. Any ideas folks?

    #2
    To clarify, you can view your Kubuntu machine from your Windows computer but you can't open the shared folder. When you try to open the folder, does a name and password window pop up? If so, what is the name of the Domain below the password?

    Comment


      #3
      OK. This works on Kubuntu 15.04 connecting from Windows 7. If you haven't already, install Samba GUI (system-config-samba) from Muon or Synaptic. Add the share from the Samba GUI (rather than using the Share properties tab for the Dolphin folder). Highlight the share and click the edit button and under the 'Basic' tab make it writable and visible. Under the 'Access' tab allow access to everyone...or not. If you want to allow access only to specific users, click 'Preferences' at the top and add a Samba User. If you add a specific user you probably have to make sure the Windows Domain name and Kubuntu Domain name (/etc/samba/smb.conf) are the same (I think but I didn't test different domains).

      As an aside, I tested this from my wife's Win7 computer. I had to clean up all the spyware before I could do anything useful. I also could not view the network and had to turn off Windows firewall temporarily. Glad I left Windows behind. lol.

      Comment


        #4
        The Samba GUI wouldn't work at first, the error message said I didn't have gksu so I did 'sudo apt-get install gksu'.

        I still get "Windows cannot access...", no password prompt, just the Network Error message if I try to open the shared folder from a Windows 10 client.

        I have a Kubuntu VM running, from there I can also see the share but get asked for a username and password when I try to open it. I tried the ones I log in with on each machine, they don't work.

        As an experiment, I shared /home/user/Downloads/ and that works, so it's presumably something about the other folder which is preventing access on a remote client.

        The permissions and owner on both folders look the same.

        Comment


          #5
          The Samba GUI wouldn't work at first, I had to do 'sudo apt-get install gksu'.
          Why use a gnome replacement for kdesudo?

          You might want to read this (or just stop using Winblows):

          https://techjourney.net/cannot-conne...in-windows-10/

          Also, generally you need to have a samba user and samba password for each of your user:

          https://www.samba.org/samba/docs/man...bpasswd.8.html
          Last edited by oshunluvr; Dec 28, 2015, 04:02 PM.

          Please Read Me

          Comment


            #6
            As I said, "I shared /home/user/Downloads/ and that works" - without modification of the Windows client I am able to create files in the folder without any login. This is what I want for the other share.

            Comment


              #7
              If 14.04 is like 15.04 you should have an icon for the Samba GUI in your Applications so you don't have to open from the terminal. When you open it go to preferences and choose your Linux user and add it as a Samba user with the password. Be sure your Domain names are the same for your Windows home group and smb.conf. Then try to log in to your VM. If you get a network error, you may need to create a bridge connection for your VM but that's a whole different animal. If the /home/user/Downloads folder works, then be sure your other folder is in /home/user.

              Comment


                #8
                I installed Samba from Muon, when it was done the icon was there but didn't work, I got the error about gksu. I looked at the properties for the icon, it says gksu <command> there, not kdesudo <command>. A minor point anyway. It works now.

                The Samba GUI on the real Linux machine already has the login account listed in Samba Users.

                If I use Partition Manager and create a new partition on the physical disc attached to the computer by USB, when I create an ext3 space there it gets mounted under media, I have no control over that. I can't get the software to let me put the mount point anywhere else. Searching led me to the idea that I could edit /etc/fstab and change what it said there, except the disc isn't listed. Last time I changed fstab the computer started in Emergency Mode anyway so I'd rather leave that alone.

                Comment


                  #9
                  Glad it works

                  Comment


                    #10
                    Well, I suppose file sharing works, yes. I wouldn't say I've fixed it though. Thanks for your help but I think I'll just reinstall the OS and see if that helps or maybe try a different one. This all seems unnecessarily complicated.

                    Comment


                      #11
                      Just an explanation for the gksu v kdesudo thing: The Samba gui program expects to be running in a Gnome environment (or it's a bug), hence it expects gksu to be available. But we are running KDE in Kubuntu. The equivalent command in KDE is kdesudo.

                      So, what I have done with Samba gui (and a couple of other programs that did the same) is to edit the K Start menu (right click on the K icon), go to the Settings section, click on Samba. On the right side you will see in the command box "gksu system-config-samba". Change this to "kdesudo system-config-samba".

                      Later I thought of another way (better) to fix this problem by creating a symlink in the /usr/bin folder that points to the kdesudo program, thereby circumventing attempts to run the missing gksu by actually running kdesudo.

                      To do this execute in the terminal: sudo ln -s /usr/bin/kdesudo /usr/bin/gksu
                      Last edited by Rod J; Dec 29, 2015, 06:50 AM. Reason: Tidying up
                      Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
                      Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

                      Comment


                        #12
                        Reread your post. I misunderstood. I thought it was fixed. So it isn't fixed for your shared folder on the USB drive that you have plugged in to your physical machine? I shared a folder on my USB drive and tested with Win7 and it works for me without having to do anything special or complicated so maybe it is an issue with your install or USB drive or maybe it just works better on 15.04? Doesn't sound like a Win10 issue since it works for your Downloads folder. By the way after I created the initial share through Samba gui and added a Samba user I can now add shares under the properties tab for the folder.

                        Comment


                          #13
                          Originally posted by Rod J View Post
                          Just an explanation for the gksu v kdesudo thing: The Samba gui program expects to be running in a Gnome environment (or it's a bug), hence it expects gksu to be available. But we are running KDE in Kubuntu. The equivalent command in KDE is kdesudo.

                          So, what I have done with Samba gui (and a couple of other programs that did the same) is to edit the K Start menu (right click on the K icon), go to the Settings section, click on Samba. On the right side you will see in the command box "gksu system-config-samba". Change this to "kdesudo system-config-samba".

                          Later I thought of another way (better) to fix this problem by creating a symlink in the /usr/bin folder that points to the kdesudo program, thereby circumventing attempts to run the missing gksu by actually running kdesudo.

                          To do this execute in the terminal: sudo ln -s /usr/bin/kdesudo /usr/bin/gksu
                          Great explanation and solution. I had no idea Samba was so poorly (or at least inefficiently) coded. Nice work!

                          Please Read Me

                          Comment


                            #14
                            force user in smb.conf

                            I kept searching and eventually found this page http://travelinlibrarian.info/2013/0...ndows-network/ which mentioned adding 'force user = <login account>' to smb.conf - now it works. I checked, if I remove the line and restart smbd I get "Access Denied" again, with the 'force user' line in smb.conf I have access.

                            Thanks everyone for your help, especially wartnose.
                            Last edited by User0x770865; Dec 29, 2015, 08:03 PM.

                            Comment

                            Working...
                            X