I got a RAID mounted as
/mnt/NAS. In this mount I got a folder called
/mnt/nas/rec. The mount is shared with SAMBA, and guest users are assigned as the user
nobody and are tied to the group
nogroup, this may not be ideal, but it work pretty good for my intentions. It is woth to mention that SAMBA users can write and make as many directories as they want in the /mnt/nas/rec folder.
I now have a user
hts that should be allowed to write to my
/mnt/nas/rec folder, I started with adding the user to the group
nogroup this went well and the user can now create folders inside /mnt/nas/rec, good. The problem arises when the user tries to enter a folder created by himself, resulting in a "Permission Denied". I tried giving the folder ownership to the group, and just to test I
chmod -R 777 * /mnt/nas/rec this will make the folder
hts created writable, but if I then create a new folder inside this one the same problem persist.
Why is this folder not writable by the user creating it? I guess I have to give all new files created inside
/mnt/nas/rec a "writable by group" setting, but how?
I then tried
ls -al which gives me the following :
drw-rwsr-x+ 2 hts users 4096 Aug 24 02:04 test1
Showing that hts is a member of the group users(?), I then ran :
root@...:/mnt/nas# usermod -g nogroup hts usermod: no changes root@...:/mnt/nas# usermod -G nogroup hts
And created a new folder in /mnt/nas/rec giving me this :
drw-rwsr-x+ 2 hts users 4096 Aug 24 02:17 hehehe
Still showing "users" as the group. I'm confused. I know there is a trillion different questions concerning this / problem like this, but I feel like I have tried them all, setting umask and ACL and much more.. I'm currently at a point where I dont know what more I can try.