Page 58 of 137 FirstFirst ... 848565758596068108 ... LastLast
Results 571 to 580 of 1362

Thread: Mount samba shares with utf8 encoding using cifs

  1. #571
    Join Date
    Jul 2007
    Beans
    277

    Re: Mount samba shares with utf8 encoding using cifs

    Anyone seen any strange permissions issues since the recent update to smbfs et al?

    I'd got everything working ok (thanks to this thread). Now I'm having a few issues again. I use an app called unison (in the repositories) to sync files on a NAS box and 2 computers (both Hardy, both mounting the NAS via cifs). This was all working fine, now unison seems to be having trouble changing files. The strange thing is it's not reporting any errors and seems to think it's written the change, but it hasn't.

    As far as I know unison makes use of rsync to do its thing.

    I've listed the mounted directories using vdir and they all see to be mounted with my uid and gid. Any suggestions of where to look welcomed.

  2. #572

    Re: Mount samba shares with utf8 encoding using cifs

    Thanks to everyone, esp Dmizer for this wonderful thread. Finally managed to mount shared folders in my NAS drive

    I can however only mount it from root, and when I issue the Echo command or Linux extensions. This is what works for me

    Code:
    sudo bash
    echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
    sudo mount -t cifs //192.168.1.69/Podcasts /media/Podcasts -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
    Now the part I can't understand is for password protected folders, I can mount only ONE, and when I try a second, it gives me an error:

    Code:
    sudo mount -t cifs //192.168.1.69/Treo /media/Treo -o username=***,password=***,iocharset=utf8,file_mode=0777,dir_mode=0777
    - mounts OK

    Code:
    sudo mount -t cifs //192.168.1.69/Backup /media/Backup -o username=***,password=***,iocharset=utf8,file_mode=0777,dir_mode
    - gives the error message:
    mount error 13 = Permission denied
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

    Any tips for this Ubuntu newbie much appreciated!

  3. #573
    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 Krydahl View Post
    Anyone seen any strange permissions issues since the recent update to smbfs et al?

    I'd got everything working ok (thanks to this thread). Now I'm having a few issues again. I use an app called unison (in the repositories) to sync files on a NAS box and 2 computers (both Hardy, both mounting the NAS via cifs). This was all working fine, now unison seems to be having trouble changing files. The strange thing is it's not reporting any errors and seems to think it's written the change, but it hasn't.

    As far as I know unison makes use of rsync to do its thing.

    I've listed the mounted directories using vdir and they all see to be mounted with my uid and gid. Any suggestions of where to look welcomed.
    most permissions issues i've run into during the course of supporting this thread are related to the server rather than the client. for cifs, it's a good idea to have different usernames for each device on your network. if you do have identical usernames, you'll have to make sure that the uid and gid numbers match.

    what nas device are you using?

  4. #574
    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 palmdoc View Post
    Thanks to everyone, esp Dmizer for this wonderful thread. Finally managed to mount shared folders in my NAS drive

    I can however only mount it from root, and when I issue the Echo command or Linux extensions. This is what works for me

    Code:
    sudo bash
    echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
    sudo mount -t cifs //192.168.1.69/Podcasts /media/Podcasts -o guest,rw,iocharset=utf8,file_mode=0777,dir_mode=0777
    Now the part I can't understand is for password protected folders, I can mount only ONE, and when I try a second, it gives me an error:

    Code:
    sudo mount -t cifs //192.168.1.69/Treo /media/Treo -o username=***,password=***,iocharset=utf8,file_mode=0777,dir_mode=0777
    - mounts OK

    Code:
    sudo mount -t cifs //192.168.1.69/Backup /media/Backup -o username=***,password=***,iocharset=utf8,file_mode=0777,dir_mode
    - gives the error message:
    mount error 13 = Permission denied
    Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

    Any tips for this Ubuntu newbie much appreciated!
    i think your best bet for solving all of these problems will be by mounting with fstab instead of manually via the CLI. but before you can get that set up, you'll have to do several things.

    first of all, you'll need to make a credentials file as outlined under the "Permanent mount" section. this should solve your problem with only being able to mount one password protected share.

    next, you'll need to configure your ubuntu client so it mounts your share with netbios name instead of ip address as outlined under the "Prework" section of the howto.

    let me know when that's done, and i'll show you how to automatically disable unix extensions on boot so you don't have to touch anything.
    Last edited by dmizer; June 30th, 2008 at 02:16 AM.

  5. #575
    Join Date
    Feb 2006
    Beans
    26

    Re: Mount samba shares with utf8 encoding using cifs

    dmizer

    I think I had rather reached the same conclusion. I do not think there is an error in the QNAP server, rather it is inerrant in the design of Unix file permissions!

    To answer your other query, I am not trying to link two Linux boxes together in the normal way, just that I had assumed that as QNAP is running Linux, and so am I it should be a piece of cake!

    Anyway, I shall continue to explore this and other threads, and I think all will be well. Will keep you posted

    Ed

  6. #576
    Join Date
    Jul 2007
    Beans
    277

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    most permissions issues i've run into during the course of supporting this thread are related to the server rather than the client. for cifs, it's a good idea to have different usernames for each device on your network. if you do have identical usernames, you'll have to make sure that the uid and gid numbers match.

    what nas device are you using?
    I think it's unlikely to be the server that's the problem, since it was working before. It's a vantec nexstar - a very cheap and cheerful NAS enclosure that you put your own drive into.

    The usernames are the same for both machines - but the uid and gid do match. It's occurred to me that when I was having problems both machines had the NAS mounted at the same time. I guess that might confuse things. I'll have a go with each machine separately and also try changing one of the user ids and get back to you when I have more info (bit short of time to experiment at the moment).

  7. #577
    Join Date
    Jul 2007
    Beans
    277

    Re: Mount samba shares with utf8 encoding using cifs

    OK, I'm confused.

    I've simplified things. I've made sure the laptop is off so that there's only the 1 machine writing to the NAS. I've created some new files to test on and I'm using rsync direct to check it isn't a problem with the unison tool.

    What I find is that rsync copies new files to the NAS no problem, but when it finds a file that has been modified it creates a hidden file with the changed file's name plus some kind of hash. I'm assuming this is a safety feature where it checks it can write the changes before deleting anything. The last step, presumably, should be to delete the old file and change the name of the new. It doesn't seem to be doing this any more. However, the log file output by rsync is reporting no errors.

    Also note that this was working correctly a week or so ago, with the NAS mounted the same way it is now and on Hardy.

    Current fstab line:
    Code:
    //NASNAME/PUBLIC /media/nas/	cifs	guest,rw,nounix,iocharset=utf8,uid=<username>,gid=<username>,file_mode=0777,dir_mode=0777 0 0
    output of ls -al:
    Code:
    drwxrwxrwx 1 <username>   <username>      0 2007-12-23 16:19 .
    drwxr-xr-x 6 root root 4096 2008-07-02 10:53 ..
    drwxrwxrwx 1 <username>   <username>     0 2006-01-01 00:28 Compendium
    drwxrwxrwx 1 <username>   <username>     0 2006-01-01 00:28 Compressed Music
    drwxrwxrwx 1 <username>   <username>     0 2006-01-01 02:46 ConnectedText
    drwxrwxrwx 1 <username>   <username>     0 2006-01-01 00:10 Documents
    drwxrwxrwx 1 <username>   <username>     0 2006-04-13 01:39 .Trash
    drwxrwxrwx 1 <username>   <username>     0 2008-02-09 21:40 Wallpapers
    drwxrwxrwx 1 <username>   <username>     0 2006-01-04 14:26 Weeklydocs
    Output from vdir looks identical except it omits ..

    output from ls -ln:
    Code:
    drwxrwxrwx 1 1000 1000 0 2006-01-01 00:28 Compendium
    drwxrwxrwx 1 1000 1000 0 2006-01-01 00:28 Compressed Music
    drwxrwxrwx 1 1000 1000 0 2006-01-01 02:46 ConnectedText
    drwxrwxrwx 1 1000 1000 0 2006-01-01 00:10 Documents
    drwxrwxrwx 1 1000 1000 0 2008-02-09 21:40 Wallpapers
    drwxrwxrwx 1 1000 1000 0 2006-01-04 14:26 Weeklydocs
    Rsync works fine to an internal HDD. Any hints about what to try next or where to look greatly appreciated.

  8. #578
    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 Krydahl View Post
    OK, I'm confused.

    I've simplified things. I've made sure the laptop is off so that there's only the 1 machine writing to the NAS. I've created some new files to test on and I'm using rsync direct to check it isn't a problem with the unison tool.

    What I find is that rsync copies new files to the NAS no problem, but when it finds a file that has been modified it creates a hidden file with the changed file's name plus some kind of hash. I'm assuming this is a safety feature where it checks it can write the changes before deleting anything. The last step, presumably, should be to delete the old file and change the name of the new. It doesn't seem to be doing this any more. However, the log file output by rsync is reporting no errors.

    Also note that this was working correctly a week or so ago, with the NAS mounted the same way it is now and on Hardy.
    this may best be addressed with the rsync team then. so, this may be a good place to start: http://samba.anu.edu.au/rsync/issues.html

    this is really outside the bounds of this howto, but what's your rsync syntax?

  9. #579
    Join Date
    Jul 2007
    Beans
    277

    Re: Mount samba shares with utf8 encoding using cifs

    rsync -r --delete /home/<username>/Documents/ /media/nas/Documents/

    I'll have a look round the link you sent. Ta.

  10. #580

    Re: Mount samba shares with utf8 encoding using cifs

    Quote Originally Posted by dmizer View Post
    i think your best bet for solving all of these problems will be by mounting with fstab instead of manually via the CLI. but before you can get that set up, you'll have to do several things.

    first of all, you'll need to make a credentials file as outlined under the "Permanent mount" section. this should solve your problem with only being able to mount one password protected share.

    next, you'll need to configure your ubuntu client so it mounts your share with netbios name instead of ip address as outlined under the "Prework" section of the howto.

    let me know when that's done, and i'll show you how to automatically disable unix extensions on boot so you don't have to touch anything.
    Thanks for your reply! Firstly I am esctatic that the last Ubuntu update fixed something in the smb system such that I can see the network shares at last in Nautilus!!

    OK I have done the credentials file and edited the fstab
    When I call:
    sudo mount -a
    I get an error unless I call as root:
    echo 0 > /proc/fs/cifs/LinuxExtensionsEnabled
    from the terminal first.
    Then when I call
    sudo mount -a
    the drive is mounted
    Appreciate tips on how to automatically disable unix extensions on boot!

    Cheers!

Page 58 of 137 FirstFirst ... 848565758596068108 ... 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
  •