I use my Synology NAS as a storage that is accessed from Windows and Linux.
On Linux, I mount it with this command:
sudo mount.cifs -v -o username=judith,uid=1000,gid=1000 //<IP address>/Subjektiv /media/judith/subjektiv/
and in general that works great, as expected.
I only encountered some strange behaviour for certain, very old folders. In the linux system, it seemed like the permissions on the folder are correct, yet I still could not change any files in that folder:
06:45:17 /media/judith/subjektiv/Buntes/Web/ALT >stat .
File: .
Size: 0 Blocks: 0 IO Block: 1048576 directory
Device: 50h/80d Inode: 7341010 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 1000/ judith) Gid: ( 1000/ judith)
Access: 2021-10-16 15:04:36.430387700 +0200
Modify: 2014-06-30 17:20:58.031245400 +0200
Change: 2014-06-30 17:20:58.031245400 +0200
Birth: -
✔ 06:45:26 /media/judith/subjektiv/Buntes/Web/ALT >id
uid=1000(judith) gid=1000(judith) groups=1000(judith),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare)
✔ 07:02:04 /media/judith/subjektiv/Buntes/Web/ALT >touch test.txt
touch: cannot touch 'test.txt': Permission denied
✘ 07:02:09 /media/judith/subjektiv/Buntes/Web/ALT >sudo touch test.txt
[sudo] password for judith:
touch: cannot touch 'test.txt': Permission denied
✘ 07:14:17 /media/judith/subjektiv/Buntes/Web/ALT >cd ..
✔ 07:14:18 /media/judith/subjektiv/Buntes/Web >touch test.txt
✔ 07:14:27 /media/judith/subjektiv/Buntes/Web >ls -la
total 25092
drwxr-xr-x 2 judith judith 0 Okt 17 2021 .
drwxr-xr-x 2 judith judith 0 Aug 14 16:33 ..
drwxr-xr-x 2 judith judith 0 Jun 30 2014 ALT
drwxr-xr-x 2 judith judith 0 Feb 23 2020 judithroth
drwxr-xr-x 2 judith judith 0 Apr 18 2017 judithrouge
-rwxr-xr-x 1 judith judith 0 Okt 17 07:14 test.txt
Solution:
- Log into the Synology Web Frontend.
- Open "File Station"
- Navigate to a folder which works
- Right click on the folder -> "Properties"
- Look at the settings for "Owner & Group" in the "General" tab
- Look at the settings for "Permission" in the "Permission" tab
- Navigate to the folder in question
- Right click on the folder -> "Properties"
- Tab "General"
- Set the settings according to the working folder.
- Check "Apply to this folder, sub-folders and files"
- Tab "Permission"
- Set the settings according to the working folder.
- Check "Apply to this folder, sub-folders and files"
- Tab "General"
Attention
Be aware that this will change the permissions for all files in all sub folders of the folder you edit. If you have files and folders with different permissions on purpose, they will get overwritten.
Posted by Judith Roth to Judith's Dev Notes (2021-10-17 05:01)