0

I'm mounting a set of NAS drives on my Linux box (Ubuntu 20.04) and everything seems to be working fine for most of the drives:

sudo mount -t cifs //mynas/mydrive /mnt/mydrive -o \
    credentials=/etc/samba/nas.creds,file_mode=0600,dir_mode=0700,uid=myuid,gid=mygid

That is, drives are mounted, they have the right umask, they are writable by my user.

Except for subfolders on one of those drives. It is mounted exactly the same way with exactly same credentials and the top-level directory is writable. However, I cannot write into any of the subdirs!

Top-level dir is writable:

$ ls -ld /mnt/mydrive
drwx------ 2 myuid mygid 0 May 17 18:22 /mnt/mydrive
$ touch /mnt/mydrive/aaa
$ ls -l /mnt/mydrive/aaa 
-rw------- 1 myuid mygid 0 May 17 18:39 /mnt/mydrive/aaa

Subdirs aren't

$ ls -ld /mnt/mydrive/new
drwx------ 2 myuid mygid 0 Mar 10  2019 /mnt/mydrive/new
$ touch /mnt/mydrive/new/aaa
touch: cannot touch '/mnt/mydrive/new/aaa': Permission denied

NAS is QNAP (derivative of Linux/Samba for OS) and all shares have the same set of credentials and R/W access. The folders were originally created via Windows (in case that matters), however it applies to all of the folders in question on all of the drives - yet only this drive shows this behavior.

Am I forgetting something? Is there another ACL mechanism I have to take into account? Any help would be appreciated!

1 Answers1

0

Turned out to be a pretty stupid mistake: 2 very similar users were created some time ago on NAS and the credentials that Linux was using belonged to a user different from the one owning the directory in question (which was somewhat easy to overlook). Top directory was world-writable, which explained partial success.