1

I want to share home folder as read-only with everyone while making its temp sub-folder writable. I tried:

[Home]                 
path = /home/bamw      
browsable =yes         
writable = no          
guest ok = yes         
read only = yes        
force user = bamw      

[Temp]                 
path = /home/bamw/temp 
browsable =yes         
writable = yes         
guest ok = yes         
read only = no         
force user = bamw      

But it looks like read-only permissions of /home/bamw override writable access to temp. What's the correct way to do it without creating dedicated Samba users?

7
  • are filesystem permissions ok? i would say nobody.nogroup and 777 for writeable folder. trivial to say that such a configuration should be used in a very restricted environment. Commented Feb 10, 2020 at 9:59
  • chmoding temp to 777 did not help
    – Jack
    Commented Feb 10, 2020 at 11:15
  • chmoding + chown? Commented Feb 10, 2020 at 11:41
  • yep: drwxrwxrwx 2 nobody nogroup 4.0K 20-02-10 10:48:46 temp
    – Jack
    Commented Feb 10, 2020 at 12:00
  • Result of ls -ld / /home /home/bamw /home/bamw/temp please. (In your question.) Commented Feb 10, 2020 at 20:47

2 Answers 2

1

Just add create mask = 777 to RW share.

You can also reset permissions and ownership to bamw

Obviously you can't write to Temp if you enter in Home first, but if you go straight to Temp it will work.

1

To sum up - the suggestion of realpclaudio in the comments solves the issue, i.e.

chmod 777 /home/bamw/temp
chown nobody:nogroup /home/bamw/temp

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .