LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2009, 06:09 AM   #1
axedre
LQ Newbie
 
Registered: Oct 2009
Distribution: Linux Mint Debian Edition
Posts: 8

Rep: Reputation: 0
Question 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.
 
Old 11-24-2009, 11:38 AM   #2
maslik
Member
 
Registered: Nov 2009
Location: Czech republic
Distribution: Ubuntu
Posts: 43

Rep: Reputation: 17
Hm, does the user smbguest has a right to write that folder in your system? You may try
Code:
chmod 777 /home/andrea/Share
as an ultimate solution.
 
Old 11-24-2009, 05:32 PM   #3
axedre
LQ Newbie
 
Registered: Oct 2009
Distribution: Linux Mint Debian Edition
Posts: 8

Original Poster
Rep: Reputation: 0
Smile

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
drwxr-xr-x  2 andrea andrea   4096 2009-11-24 23:21 Share
So I suppose it means the folder is owned by me (duh! ) both as user and group, whereas smbguest has:

Code:
andrea@notebook ~ $ more /etc/passwd | grep smbguest
smbguest:x:1001:1001:Samba guest account:/dev/null:/dev/null

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

Last edited by axedre; 11-24-2009 at 05:33 PM. Reason: forgot code tags for second code snippet
 
Old 11-26-2009, 08:59 AM   #4
axedre
LQ Newbie
 
Registered: Oct 2009
Distribution: Linux Mint Debian Edition
Posts: 8

Original Poster
Rep: Reputation: 0
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
 
Old 11-26-2009, 09:17 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
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>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos+Samba+AD write list problem mago Linux - Server 0 03-09-2009 06:27 PM
expected specifier-qualifier-list ip.h quantt Programming 1 02-12-2009 04:05 PM
samba with mulriple configurations not working as expected nass Linux - Server 2 12-13-2008 09:03 AM
error: expected specifier-qualifier-list before t_scalar_t sunilvadranapu SUSE / openSUSE 1 09-04-2008 02:30 PM
Write Access on Samba Server not working urzumph Linux - Networking 2 03-04-2004 06:03 AM


All times are GMT -5. The time now is 11:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration