Score:0

Unable to change permissions and user:group of SMB mounted directory

cl flag

I have a trueNAS SMB mount to a Proxmox VM directory. The mount works fine however, in order for services to automatically move files from one part of the same directory to another, I need to remove root as the user:group. I'm able to set the higher folders to the user I want and set the permissions at /media all the way into that directory at /media/data/media however, inside media is all root -

drwxrwxrwx 5 uaaron uaaron 4096 Feb 15 23:01 ..
drwxr-xr-x 2 root   root      0 Feb 16 15:08 movies
drwxr-xr-x 2 root   root      0 Feb 16 15:08 music
drwxr-xr-x 2 root   root      0 Feb 16 15:08 tv

where this resides -

/media/data
➜  data ls -al
total 20
drwxrwxrwx 5 uaaron uaaron 4096 Feb 15 23:01 .
drwxrwxr-x 3 uaaron uaaron 4096 Feb 15 23:00 ..
drwxrwxrwx 5 uaaron uaaron 4096 Feb 15 23:03 media
drwxrwxrwx 5 uaaron uaaron 4096 Feb 16 03:22 torrents
drwxrwxrwx 5 uaaron uaaron 4096 Feb 15 23:04 usenet

I used sudo chown -R uaaron:uaaron media and sudo chmod -R 775 media to own this directory and did the same for all inside it but not able to for the 3 above which is where the SMB is mounted.

My fstab file is structured as such -

//<ip/share> /media/data/media/tv cifs credentials=/home/uaaron/.smbcredentials 0 0
//<ip/share> /media/data/media/music cifs credentials=/home/uaaron/.smbcredentials 0 0 

Any help would be really appreciated. I've searched quite a bit all over the place and my googlefu as failed me.

user2985708 avatar
cl flag
So I was able to temporarily fix this by commenting out the mounts in fstab and the setting the permissions and user:group on the folders and the un-commenting the mount config in fstab. Though, when restarting the VM after this, the problem persists. This leads me to believe this may be a permissions issue within the TrueNAS share itself.
Score:0
cl flag

If anyone runs into this issue you'll need additions permissions for the user - ~/.smbcredentials,uid=xxx,gid=xxx 0 0 where uid & gid sets local permissions for the directory mounted as SMB, removing root.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.