Page 67 of 137 FirstFirst ... 1757656667686977117 ... LastLast
Results 661 to 670 of 1362

Thread: Mount samba shares with utf8 encoding using cifs

  1. #661
    Join Date
    Apr 2008
    Beans
    81
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    Okay, lets try changing the ownership on one directory for testing:
    Code:
    sudo chown -R joe:joe /media/NDrive/RECYCLER
    Run this command again:
    Code:
    ls -l /media/NDrive
    If the output shows this:
    Code:
    drwxrwxrwx 1 joe joe  0 2007-09-13 17:03 RECYCLER
    Then try to unmount and remount the drive to see if the permissions are persistent. If they are persistent, try running the same command on the rest of the directories. It's entirely possible that it was simply a glitch on the server side.
    I tried these instructions out and everything worked great. I unmounted and remounted and the ownership was still mine. So i changed the ownership for everything to mine using the command you provided. Everything worked great.

    However, anything i copy to the server is still owned by the root. Here is my updated ownerships. epic.txt is the file i just copied over to the NDrive. Why is everything owned by the root by default? Its almost as if root is copying over the files.

    Maybe my account doesn't have permissions to copy files to a server? Here is what i get when i run ls -l /media/NDrive.

    Code:
    joe@joe-PC:~$ ls -l /media/NDrive
    total 5
    drwxrwxrwx 1 joe  joe    0 2008-08-28 10:37 Backups
    -rwxrwxrwx 1 joe  joe   79 2008-09-11 12:56 desktop.ini
    -rw-r--r-- 1 root root 995 2008-09-12 13:34 epic.txt
    drwxrwxrwx 1 joe  joe    0 2008-09-11 12:56 My Music
    drwxrwxrwx 1 joe  joe    0 2008-09-11 12:56 My Pictures
    drwxrwxrwx 1 joe  joe    0 2007-09-13 17:03 RECYCLER
    drwxrwxrwx 1 joe  joe    0 2008-09-08 19:57 School Work

  2. #662
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Okay, try adding the noperm option like so:
    Code:
    //student/gilberjp$    /media/NDrive        cifs    credentials=/root/.smbcredentials,nounix,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

  3. #663
    Join Date
    Apr 2008
    Beans
    81
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    Okay, try adding the noperm option like so:
    Code:
    //student/gilberjp$    /media/NDrive        cifs    credentials=/root/.smbcredentials,nounix,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

    This did the trick for me. I can copy files to it and still edit the and everything. However, when i run the commandls -l /media/NDrive, this is the output.

    Code:
    total 1
    drwxrwxrwx 1 root root  0 2008-09-12 15:36 Backups
    -rwxrwxrwx 1 root root 79 2008-09-11 12:56 desktop.ini
    drwxrwxrwx 1 root root  0 2008-09-11 12:56 My Music
    drwxrwxrwx 1 root root  0 2008-09-11 12:56 My Pictures
    drwxrwxrwx 1 root root  0 2007-09-13 17:03 RECYCLER
    drwxrwxrwx 1 root root  0 2008-09-12 15:37 School Work
    It still says everything is owned by the root. Should this be something to worry about? Is it only doing this because it is ignoring permissions? Also, i was thinking of trying to get rsync to backup my files to my NDrive using cron to automate the process to a schedule . I have read that i might have to give cron root permissions to run successfully. Do you think cron and rsync with root permissions copying files over to the NDrive will have any bad effects on the permissions we have just fixed?

    Thank you so much for all the troubleshooting help!!

  4. #664
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by suzypeppercorn View Post
    This did the trick for me. I can copy files to it and still edit the and everything. However, when i run the commandls -l /media/NDrive, this is the output.

    Code:
    total 1
    drwxrwxrwx 1 root root  0 2008-09-12 15:36 Backups
    -rwxrwxrwx 1 root root 79 2008-09-11 12:56 desktop.ini
    drwxrwxrwx 1 root root  0 2008-09-11 12:56 My Music
    drwxrwxrwx 1 root root  0 2008-09-11 12:56 My Pictures
    drwxrwxrwx 1 root root  0 2007-09-13 17:03 RECYCLER
    drwxrwxrwx 1 root root  0 2008-09-12 15:37 School Work
    It still says everything is owned by the root. Should this be something to worry about? Is it only doing this because it is ignoring permissions? Also, i was thinking of trying to get rsync to backup my files to my NDrive using cron to automate the process to a schedule . I have read that i might have to give cron root permissions to run successfully. Do you think cron and rsync with root permissions copying files over to the NDrive will have any bad effects on the permissions we have just fixed?

    Thank you so much for all the troubleshooting help!!
    No problem. Yes, the new option is simply ignoring the permissions locally. Since the permissions on the server are correct, it won't matter anymore if the shares show root locally.

    Enjoy your newfound freedom ...

  5. #665
    Join Date
    Apr 2008
    Beans
    81
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    No problem. Yes, the new option is simply ignoring the permissions locally. Since the permissions on the server are correct, it won't matter anymore if the shares show root locally.

    Enjoy your newfound freedom ...
    thanks so much for the help. i'll definitely enjoy the freedom.

  6. #666
    Join Date
    Apr 2008
    Beans
    1

    Re: Mount samba shares with utf8 encoding using cifs

    Hey - thanks for this. A cutdown version of these instructions(which didn't require any software installs) worked in fixing my problem with EEEPCs (running Xandros) accessing files on our Windows Server 2003 network.

  7. #667
    Join Date
    Apr 2008
    Beans
    45

    Help Mounting Drive

    dmizer -

    Hello. I'm having a new issue mounting a samba share and am hoping you can help. My hope is that you can give me some commands to use to help better troubleshoot this problem.

    I am running Ubutnu 8.04 from my laptop. Using my home wireless network, I am trying to mount a share on a Window XP PC.

    In the past, I think I was able to connect to my share with the same configuration as I'm currently using; I think this problem is intermittent. Sometimes, I login to my Ubuntu laptop and I can see my printers (which are attached to my Windows XP PC) and my network shares. Othertimes, I see nothing.

    To take name resolution out of the equation, I have hardcoded into my hosts file the IP address for my Windows XP PC (192.168.1.100). I've checked my router to validate that this is the assigned IP address. I can successfully ping the IP address and the hp-media-pc hostname.

    When I run smbtree, sometimes I get no output. Other times I get:

    Code:
    dave@dave-laptop:~$ smbtree
    Password:
    MSHOME
            \\HP-MEDIA-PC
    session request to HP-MEDIA-PC failed (Called name not present)
    session request to *SMBSERVER failed (Not listening on called name)
    dave@dave-laptop:~$
    The entry is my fstab file should be fine... it has worked in the past. However, here is the entry:

    Code:
    //hp-media-pc/dwitkin /media/hp_media_pc cifs credentials=/home/dave/.smbcredentials,uid=1000,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0
    When I try to mount manually, I currently get:
    Code:
    dave@dave-laptop:~$ sudo mount -t cifs //192.168.1.100/dwitkin /media/hp_media_pc
    [sudo] password for dave:
    Password:
    mount error 2 = No such file or directory
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
    dave@davelaptop:~$
    I tried the smbclient command, but here is what I get:
    Code:
    dave@dave-laptop:~$ smbclient -L //192.168.1.100/dwitkin
    session request to 192.168.1.100 failed (Called name not present)
    session request to 192 failed (Called name not present)
    session request to *SMBSERVER failed (Not listening on called name)
    dave@dave-laptop:~$
    /home/dave/.smbcredentials
    This file contains the user id and password for the Windows share -- not the Ubuntu machine. Owner of the file is root, group of the file is root. Owner has read/write permissions. No one else has any rights.

    /etc/samba/smbusers
    Just one line: dave="dave". Dave is the user name on the Ubuntu machine. My user name on the Windows XP PC is different, but I think I've tested with the other user name and it didn't seem to change the results.

    I've tried a few things:
    1. I've shut down the firewall on the windows server, and still the same thing.
    2. I can successfully ping the PC using either the IP address or the pc name.
    3. I made sure that samba, smbfs and smbclient are installed.

    Can you give me a list of commands to run through to help troubleshoot? Thanks for your help.

  8. #668
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Help Mounting Drive

    Hi dwitkin,

    Do you have a samba server configured? If so, can you post your /etc/samba/smb.conf file?

    Do you have an iptables configuration in place? You can check with the following command:
    Code:
    sudo iptables -L
    The output should look like this:
    Code:
    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    Being able to ping by ip address or pc name doesn't mean that cifs will be able to recognize it. CIFS uses netbios, so you may be able to fix your problem simply by installing winbind, and correctly configuring /etc/nsswitch.conf

    Does the manual mount always fail? Does the fstab only fail sometimes on boot? Will the mount work if you do this:
    Code:
    sudo mount /media/hp_media_pc
    That should be enough to start with.

  9. #669
    Join Date
    Sep 2008
    Beans
    5

    Re: Mount samba shares with utf8 encoding using cifs

    Hi guys I'm having a bit of a funny trying to get my sharing working, and i'm hoping the experts can tell me where i'm going wrong

    I edited the fstab file with these two lines

    //Blueslider/CDrive /Share/Blueslider cifs credentials=/home/tim/.smbcredentials,nounix,noperm,iocharset=utf8,file_ mode=0777,dir_mode=0777 0 0
    //Fester/c$ /Share/Fester cifs credentials=/home/tim/.smbcredentials,nounix,noperm,iocharset=utf8,file_ mode=0777,dir_mode=0777 0 0
    which both mounted perfectly.... in read only mode!
    i then experimented with adding noperm,nounix to the lines to see if they made any difference.

    after each change i did a sudo mount -a to remount everything. Is this enough, or do i need to do more?

    Any thoughts would be appreciated
    Thanks!
    Tim

  10. #670
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,361
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by timsa View Post
    Hi guys I'm having a bit of a funny trying to get my sharing working, and i'm hoping the experts can tell me where i'm going wrong

    I edited the fstab file with these two lines



    which both mounted perfectly.... in read only mode!
    i then experimented with adding noperm,nounix to the lines to see if they made any difference.

    after each change i did a sudo mount -a to remount everything. Is this enough, or do i need to do more?

    Any thoughts would be appreciated
    Thanks!
    Tim
    Hello Tim,

    Please use [code][/code] instead of the quote tags, that way the lines will not have arbitrary spaces and line breaks in them.

    Tell me a bit more about your setup. The shares you're attempting to connect to, are they on a Windows computer, or on a NAS device?

    Try unmounting the shares with this command:
    Code:
    sudo umount /Share/Blueslider
    sudo umount /Share/Fester
    Then make sure your Ubuntu user has permissions to read and write the target directories:
    Code:
    sudo chmod 777 /Share/Blueslider
    sudo chmod 777 /Share/Fester
    Then remount your shares with sudo mount -a and see if you have write permissions.

Page 67 of 137 FirstFirst ... 1757656667686977117 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •