Need help with linux permissions on Synology

Hi,

I use Linux since I switched 2010 from Windows to Ubuntu, so far my linux skills are ok. I use two Synology NAS devices, that I access from Windows and Linux.

I use cifs as protocol in my fstab. I like it more than nfs and it worked for me since 8 years now.

My fstab entry is this:

//192.168.0.100/share /media/nas vers=1.0,user,uid=MYLINUXUSER,gid=MYLINUXUSER,username=SYNOLOGYUSER,password=SYNOLOGYPASSWORD 0 0

This entry worked for my perfectly for years. But somehow, I dont know by doing what, I totally messed up the file permissions on the synology. I know about the permission system in linux, but even with my few-years-exp-skills on Linux, I cannot fix it until today.

Its so damaged that I even switched back to Windows 10 for a month, just for beeing able to get work done.

I know I could totally reset the NAS, but its not what I want as I want to examine how to fix this; hopefully with your help, because I have no more ideas.

So far, what I tried:

I know that using commands like “chown” or “chmod” exist at two points: On my local Linux PC where the NAS is mounted, and also on the NAS itself, where I can go via “ssh”.

Lets say the username on the NAS is “syno”. The standard group on synology is “users”.
When I do a complete

chown -R syno:users /volume1/share on my NAS, and a 
chmod -R 777 /volume1/share

I can access all files read/write. Yes, I know that 777 isnt the recommended permission for files, but just for now I wanted to go as “Open” as possible.

Now the issue: on some folders I can write, on some not. I try for example a

touch testfile

in a specific folder. On some folders the file is writable, on some not.

So I thought about the topic “umask”. To be most “open” again, I try to set umask to “000”, but everytime I remount and access my files from nautilus, they arent writable again :cry:

I cannot figure this out, literally since month. I dont know how I could mess the file permissions up in such a way, it worked for years.

I would be very happy if someone could help, assist me.

You can also write to me via Telegram,

@pragomer

Kind regards. And thank you !

Here another hint:

Whenever I execute the command

touch file1

or so in a folder,

the permissions are going to be like this:

grafik

I think they should be rw/rw/rw

What’s unusual about your fstab is there’s no declaration of write access (though it’s usually default), it may be defaulting to ro (read only).

Try adding rw as an option and reset.

Example:

//192.168.0.100/share /media/nas rw,vers=1.0,user,uid=MYLINUXUSER,gid=MYLINUXUSER,username=SYNOLOGYUSER,password=SYNOLOGYPASSWORD 0 0

As this NAS is being used with Windows i’m assuming it’s formatted with NTFS?

You should consider the following for NTFS:

"ntfs/vfat = permissions are set at the time of mounting the partition with umask, dmask, and fmask and can not be changed with commands such as chown or chmod.

I advise dmask=027,fmask=137 (using umask=000 will cause all your files to be executable). More permissive options would be dmask=000,fmask=111
"

Fstab - Community Help Wiki