Results 1 to 8 of 8

Thread: Permission Problem with Synchronization

  1. #1
    Join Date
    May 2005
    Location
    Bangladesh
    Beans
    87
    Distro
    Ubuntu

    Question Permission Problem with Synchronization

    Hi,
    I have a Western Digital NFS where I keep backup of my files. After switching to Ubuntu, I found 2 excellent file/folder Synchronization applications. But none of them are able to sync with NFS directly. So here is what I did, I mount the network location locally with the following command (to clarify that I have given write permission to the folder) -
    Code:
    sudo mount //192.168.192.13/Files/ /media/Net-Files/ -o username=user,password=pass,file_mode=0777,dir_mode=0777
    and then I tried to sync with that folder.

    Now after modifying a file, when I want to sync back, it gives the following errors

    FreeFileSync-


    Unison-


    I can understand that this is a permission related problem. I tried to sync->modify->sync with a flash drive and there was no error, but this happens only with the NFS.

    Do you know any solution for this?
    Omi Azad
    Contributor - Bangla Computing and Localization Project Ekushey: http://www.ekushey.org

  2. #2
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    801
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Permission Problem with Synchronization

    It looks like you mounted your NAS with SMB (Windows share) instead of NFS. I don't know if that was intentional but chances are Unison won't be able to propagate Unix permissions to the NAS mounted as SMB.

    What you can do is add dontchmod = true to your Unison profile. Or work on properly mounting with the mount.nfs command.

    Cheers!
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  3. #3
    Join Date
    May 2005
    Location
    Bangladesh
    Beans
    87
    Distro
    Ubuntu

    Re: Permission Problem with Synchronization

    Quote Originally Posted by LewisTM View Post
    It looks like you mounted your NAS with SMB (Windows share) instead of NFS. I don't know if that was intentional but chances are Unison won't be able to propagate Unix permissions to the NAS mounted as SMB.

    What you can do is add dontchmod = true to your Unison profile. Or work on properly mounting with the mount.nfs command.

    Cheers!
    Well I was searching for a solution how to mount the share and that was the first working solution I found. As I'm not a geek, I just wanted to learn a solution that works.

    Can you please help me to learn how I can mount the partition as NFS?

    Also, if Linux chmod my files, will there be any problem to access them from Windows?
    Omi Azad
    Contributor - Bangla Computing and Localization Project Ekushey: http://www.ekushey.org

  4. #4
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    801
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Permission Problem with Synchronization

    Sure thing buddy

    Many NAS offer NFS or SMB as a way to access the files from client computers. For Linux NFS is usually a bit faster and will support permissions. SMB can work fine, only don't try to change the attributes. Changing perms on the NAS shouldn't affect Windows users accessing through SMB, the NAS will take control of the files and serve them transparently (at least it SHOULD).

    For NFS add a line in your /etc/fstab like
    Code:
    192.168.192.13:/Files /media/Net-Files nfs defaults 0 2
    and go from there, perhaps adding options noauto,user to be able to mount the NAS on demand as a normal user. By default the NAS would be mounted a startup.
    The command line should be
    Code:
    mount.nfs 192.168.192.13:/Files /media/Net-Files
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  5. #5
    Join Date
    May 2005
    Location
    Bangladesh
    Beans
    87
    Distro
    Ubuntu

    Re: Permission Problem with Synchronization

    Quote Originally Posted by LewisTM View Post
    Sure thing buddy

    Many NAS offer NFS or SMB as a way to access the files from client computers. For Linux NFS is usually a bit faster and will support permissions. SMB can work fine, only don't try to change the attributes. Changing perms on the NAS shouldn't affect Windows users accessing through SMB, the NAS will take control of the files and serve them transparently (at least it SHOULD).

    For NFS add a line in your /etc/fstab like
    Code:
    192.168.192.13:/Files /media/Net-Files nfs defaults 0 2
    and go from there, perhaps adding options noauto,user to be able to mount the NAS on demand as a normal user. By default the NAS would be mounted a startup.
    The command line should be
    Code:
    mount.nfs 192.168.192.13:/Files /media/Net-Files
    Thanks once again. But my NAS needs username/password to access. Can you please suggest how to put that?

    I also didn't get the noauto,user option.
    Omi Azad
    Contributor - Bangla Computing and Localization Project Ekushey: http://www.ekushey.org

  6. #6
    Join Date
    Oct 2008
    Location
    Ottawa, Canada
    Beans
    801
    Distro
    Xubuntu 12.10 Quantal Quetzal

    Re: Permission Problem with Synchronization

    If it needs a username/password that means it only supports Windows-style access, so forget about NFS.

    Just go as you did at the beginning and add the dontchmod = true line to your /home/<user>/.unison/<profile>.prf
    husband@wife$ make sandwich
    Permission denied
    husband@wife$ sudo make sandwich

  7. #7
    Join Date
    May 2005
    Location
    Bangladesh
    Beans
    87
    Distro
    Ubuntu

    Re: Permission Problem with Synchronization

    Quote Originally Posted by LewisTM View Post
    If it needs a username/password that means it only supports Windows-style access, so forget about NFS.

    Just go as you did at the beginning and add the dontchmod = true line to your /home/<user>/.unison/<profile>.prf
    Looks like I didn't have any luck with this solution. The error remains same.

    About the NFS, when I try to browse the network share it shows me the share without entering into the Windows share portion -


    I must thank you for giving your valuable attention to this issue. Please suggest what I can do now.
    Omi Azad
    Contributor - Bangla Computing and Localization Project Ekushey: http://www.ekushey.org

  8. #8
    Join Date
    May 2005
    Location
    Bangladesh
    Beans
    87
    Distro
    Ubuntu

    Re: Permission Problem with Synchronization

    Just tried a new Java based application called DirSync Pro, and looks like it do not have all those problems. Closing this thread as my job is done.
    Omi Azad
    Contributor - Bangla Computing and Localization Project Ekushey: http://www.ekushey.org

Tags for this Thread

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
  •