![]() |
Samba write list not working as expected
Hello everyone! This is my first post here.
The question is pretty simple, but I haven't found the answer yet neither by googling nor on this forum. I have a directory in my home folder which I want to use to share files. The folder must not be public, so I created a user named 'smbguest', along with a password. Then I wrote this in my smb.conf file: [share] path = /home/andrea/Share valid users = andrea smbguest browseable = yes writeable = yes write list = andrea smbguest However, if I login to the share (Nautilus=>smb://localhost/share) with username andrea, I can correctly write files; if I login with the smbguest user, I cannot write files. Why is this so, since I added smbguest to the write list? Thanks in advance, Andrea P.S. uname -a returns "Linux notebook 2.6.28-15-generic #52-Ubuntu SMP Wed Sep 9 10:49:34 UTC 2009 i686 GNU/Linux", in case it helps. |
Hm, does the user smbguest has a right to write that folder in your system? You may try
Code:
chmod 777 /home/andrea/Share |
Hi and thanks for the reply! I actually saw your reply by "accident" since I hadn't turned e-mail notifications on (I thought they'd be on by default).
These are the permissions on the 'Share' folder: Code:
andrea@notebook ~ $ ls -lA | grep Share Code:
andrea@notebook ~ $ more /etc/passwd | grep smbguest Giving 777 permissions to the folder is clearly a solution (which I tried, and of course it worked - tried creating an empty folder inside Share and it created it with smbguest:nobody ownership) but I was actually looking for a more elegant solution, and honestly I thought adding smbguest to the share's write list in smb.conf would do the trick. In fact, why is there even a "write list" property if, ultimately, the user itself must have the permissions matching those of the folder? Any other suggestions? Thanks in advance. Andy |
Up! :)
I thought... would adding smbguest to my group (andrea) help in any way? And then setting 775 permissions to the Share folder. If I could avoid changing the default folder permissions it'd be great! Andrea |
Since there is only one other user to add to the write list, you might consider using setfacl to add an acl allowing the user smbguest write access to the directory. The disadvantage of adding smbuser is that that user would then have group access to other directories which have "andrea" group ownership.
# set default facl that is inherited by all files & directories created (only do this if that is what you want) sudo setfacl -m d:u:smbuser:rwx <directory> # set the facl on the directory itself. (setting the default won't give permission on the directory itself or old files) sudo setfacl -m u:smbuser:rwx <directory> |
All times are GMT -5. The time now is 02:45 AM. |