1

I'm new in linux so forgive me if I make obvious mistakes. I'm trying to figure out how to get my laptop synced with my (Synology) NAS.

I have installed FreeFileSync. It works perfect between folders on my laptop and from NAS to laptop.

I have mounted my shared folder with following line in /etc/fstab

//192.168.10.111/Shared /media/shared cifs username=XXX,password=YYY,domain=WORKGROUP,rw,uid=1000,gid=1000 0 0

I've uses several mounting options, as with or without umask=0222,file_mode=0777,dir_mode=0777

If followed the instructions as described here.

I've tried with

  • sudo chown kasper:kasper /media/shared
  • sudo chmod 777
  • sudo chmod -R 777 /media/shared

BUT in all cases I get the following error code in FreeFileSync for the files to be transfered to the NAS:

errorcode 13: Permission denied [chown]

When I do it manually (copy/paste files and folders to mounted folder) everything works fine. It seems that FreeFileSync does not have the correct permissions, but I don't find a way to change it. I hope somebody can help me out. It took me a lot of hours already without any difference.

Thank you in advance.

N0rbert
  • 99,918
Kasper
  • 13
  • 1
    Does touch /media/shared/somefile works from terminal? – N0rbert Jan 10 '18 at 12:20
  • bash: /media/tinka/test/TESTEN/waarom: Permission denied (shared was an example, tinka is the real folder.) So - after 'touch' file, i've got permission denied – Kasper Jan 10 '18 at 12:50
  • so it is permissions issue, not FreeFileSync – N0rbert Jan 10 '18 at 12:53
  • That's what I thought, but I cannot solve the permission problem, and as user (probably I've more rights) I do not face the same problem – Kasper Jan 10 '18 at 12:54
  • UPDATE: because i did not know the meaning of the 'touch' command I looked it up. The first time I tried to touch an existing file. If I do it with a new 'somefile' (as you said) it created an empty 'somefile'. So it is not a permissions issue? – Kasper Jan 10 '18 at 14:54
  • touch is often used for creation of new empty file. If user has write permission to some directory, it creates file. – N0rbert Jan 10 '18 at 14:59
  • Are you sure that user has id=1000? Which id (only number) your /media/shared users have? – N0rbert Jan 10 '18 at 15:04
  • kasper@XXXXX ~ $ id -u kasper 1000 – Kasper Jan 10 '18 at 15:06
  • kasper@XXXXX ~ $ ls -l /media/tinka/test total 0 drwxrwxrwx 3 kasper kasper 0 jan 9 21:47 Linux Leren drwxrwxrwx 2 kasper kasper 0 jan 10 15:50 TESTEN – Kasper Jan 10 '18 at 15:10
  • kasper@XPS-L502X ~ $ id -g kasper 1000 – Kasper Jan 10 '18 at 15:11
  • It seems I got it. You may try to go to FreeFileSync Options and uncheck here two checkmarks - File-safe copy and Copy file access permissions (the last one may be the problem). – N0rbert Jan 10 '18 at 15:15
  • 1
    you're a hero! thanks a lot!! this worked for me. – Kasper Jan 10 '18 at 15:18

1 Answers1

1

Your mount options are correct.

The problem is between file-system and FreeFileSync.

Go to FreeFileSync, Options and uncheck here two checkmarks - File-safe copy and Copy file access permissions (the last one may be the problem).

N0rbert
  • 99,918