Trying to mount windows folder on Linux - getting error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tvnaidu
    Contributor
    • Oct 2009
    • 365

    Trying to mount windows folder on Linux - getting error

    Trying to mount windows folder on Linux machine, getting this error. I have a folder called "CheckIn" on windows, I made that folder as Network sharing.
    ON lInux, I tried to access that folder by mounting, getting error "Could not resolve mount point".

    # mkdir /mnt/winstuff
    # smbmount \\windows-machine-ip-addr\CheckIn
    Could not resolve mount point
    # ps -eaf | grep smb
    root 27420 1 0 Dec03 ? 00:00:00 smbd -D
    root 32063 30395 0 10:27 pts/6 00:00:00 grep smb
    #
  • tvnaidu
    Contributor
    • Oct 2009
    • 365

    #2
    Finally mounted, I was not pass username/password earlier, now I can access folder, but if I tried to go inside folder, getting "permission denied"

    $ mount -t smbfs -o username=xyz,pa ssword=xyzp //win-ip-addr/main_folder /mnt/winstuff/
    $ cd /mnt/winstuff/
    $ ls
    main_folder
    $ cd main_folder
    $
    $ ls -l
    ls: reading directory .: Permission denied
    total 0
    $

    Comment

    • tvnaidu
      Contributor
      • Oct 2009
      • 365

      #3
      tried to munt cifs type instead smbfs, but kernel doesnot support cifs type.

      Comment

      • AmberJain
        Recognized Expert Contributor
        • Jan 2008
        • 922

        #4
        Originally posted by tvnaidu
        Finally mounted, I was not pass username/password earlier, now I can access folder, but if I tried to go inside folder, getting "permission denied"

        $ mount -t smbfs -o username=xyz,pa ssword=xyzp //win-ip-addr/main_folder /mnt/winstuff/
        $ cd /mnt/winstuff/
        $ ls
        main_folder
        $ cd main_folder
        $
        $ ls -l
        ls: reading directory .: Permission denied
        total 0
        $
        You need to give the user read privileges for main_folder. Try changing permissions using chmod.

        Comment

        • tvnaidu
          Contributor
          • Oct 2009
          • 365

          #5
          Thanks, on windows side, I changed permission, still I am getting this error

          Comment

          • tvnaidu
            Contributor
            • Oct 2009
            • 365

            #6
            also I changed using chmod on Linux for main_folder, once I go inside, I can't see anything

            Comment

            • AmberJain
              Recognized Expert Contributor
              • Jan 2008
              • 922

              #7
              I misread one of your previous post. Try using chmod to change permissions on main_folder with -R (recursive) option.

              Comment

              • AmberJain
                Recognized Expert Contributor
                • Jan 2008
                • 922

                #8
                Alternatively, when you are inside main_folder, use chmod with -R on all files using * wildcard.

                Comment

                • tvnaidu
                  Contributor
                  • Oct 2009
                  • 365

                  #9
                  I did with -R option, no luck, I am getting "permission denied", also I added ,rw,exec,umask= 000, still samething

                  mount -t smbfs -o username=xyz,pa ssword=xyzp,rw, exec,umask=000 //win-ip-addr/main_folder /mnt/winstuff/

                  Comment

                  • AmberJain
                    Recognized Expert Contributor
                    • Jan 2008
                    • 922

                    #10
                    What happens when you do:
                    Code:
                    sudo ls -al
                    inside main_folder.


                    Also, goto parent directory of main_folder, and from terminal:
                    Code:
                    sudo ls -l
                    and paste here the line that corresponds to main_folder.

                    Comment

                    • AmberJain
                      Recognized Expert Contributor
                      • Jan 2008
                      • 922

                      #11
                      Also, post output of:
                      Code:
                      mount

                      Comment

                      • tvnaidu
                        Contributor
                        • Oct 2009
                        • 365

                        #12
                        [root@localhost /]# cd /mnt/winstuff/
                        [root@localhost winstuff]# sudo ls -l
                        total 4399
                        drwxr-xr-x 1 root root 4096 Dec 8 16:03 vma22_linux
                        [root@localhost winstuff]# ls vma22_linux
                        ls: reading directory vma22_linux: Permission denied
                        [root@localhost winstuff]# cd vma22_linux
                        [root@localhost vma22_linux]# sudo ls -l
                        ls: reading directory .: Permission denied
                        total 0
                        [root@localhost vma22_linux]#
                        [root@localhost vma22_linux]# cd ..
                        [root@localhost winstuff]# pwd
                        /mnt/winstuff
                        [root@localhost winstuff]# chmod -R 755 vma22_linux
                        chmod: `vma22_linux': Permission denied
                        [root@localhost winstuff]# cd vma22_linux
                        [root@localhost vma22_linux]# sudo ls -l
                        ls: reading directory .: Permission denied
                        total 0
                        [root@localhost winstuff]#


                        [root@localhost winstuff]# mount
                        /dev/hda2 on / type ext3 (rw)
                        none on /proc type proc (rw)
                        usbdevfs on /proc/bus/usb type usbdevfs (rw)
                        /dev/hda1 on /boot type ext3 (rw)
                        none on /dev/pts type devpts (rw,gid=5,mode= 620)
                        none on /dev/shm type tmpfs (rw)
                        //win-ip-addr/main_folder on /mnt/winstuff type smbfs (0)
                        [root@localhost winstuff]#

                        Comment

                        • tvnaidu
                          Contributor
                          • Oct 2009
                          • 365

                          #13
                          It is working now, what I did was I copied this main_folder into different dir on windows machine, earlier folder is VSS checkout folder, may be because of perm it is not working?.

                          after I copy that foder into diff new folder, I can access all files.

                          thanks for help

                          Comment

                          Working...