Samba share, permissions help!

Associate
Joined
21 May 2003
Posts
1,008
Hi. I've got Ubuntu setup and want to access some folders on it. most of the folders i want anyone to be able to just read, but i'm trying to get one to allow me (with a prompt for username/password) to write to.

if anyone can help, the share I want to write to is V, and i've tried adding "write list = michali" (michali is my username) but it just says no permissions when i try it from windows (as opposed to popping up with an insert password box).

The other two shares I only manged to get working when i forced the user to be michali. I can';t do this for V becuase then everyone and anyone will be able to write to it as well.

here's the smb.conf i've got so far:

Code:
[global]
workgroup = MSHOME
server string = Samba
netbios name = ABIT
#hosts allow = XX.XXX.XXX.XXX XX.XXX.XXX.XXX
security = share
smb passwd file = /etc/samba/smbpasswd

wins support = no
[D]
path = /media/Downloads
available = yes
browseable = yes
public = yes
writable = no
force user = michali

[V]
path = /media/VIDEOS
available = yes
browseable = yes
public = yes
writable = yes
security = user
write list = @michali
  
[AllVideos]
path = /media/VIDEOS/My Videos
available = yes
browseable = yes
public = yes
writable = no
force user = michali

Any help is appreciated!
 
Try looking at the file permissions from within Linux itself :)
My first guess would be that the user michali doesn't actually have write permissions to the directory that you're trying to use.

I'm also not totally certain if you're editing the samba config files yourself, or if you're getting something to do it for you, but this is what I'd have for the V share:
Code:
[V]
path = /media/VIDEOS
browsable = yes
read only = yes
write list = michali
This may be a stupid question, but have you remembered to add michali to the samba users list- This is different & separate to the login users.

Another point- Are you trying to have all the other shares writable to publically?
If you are, then you need to remove the read only option- What you've got ATM are read only public shares, and by adding the force user bit, you allowed michali to write to them.

-Leezer-
 
Last edited:
k, Not a stupid question at all. didn't know there were different users for linux and samba.

Anyway, i added michali as a samba user (smbpasswd -a michali).

I then changed the code to what you suggested but still no write permissions. It doesn't prompt for a password but i'm guessing windows sends my windows password to it which is the same as the samba password. I can defiantely write to the paths in linux logged in as michali (it's the only user on the system). Could it be anything missing from *** global part?

What you've got ATM are read only public shares, and by adding the force user bit, you allowed michali to write to them.
that's pretty much what i want. I want the shares to be public, but only michali to write to them.

EDIT: FINALLY got it working. your codes works a treat but i needed "security = user" instead of "security = share" in *** Global part. thanks a lot!
 
Last edited:
k turns out it doesn't work. Dunno why i thought it did but the shared directory at *** moment is not accessible by the guest. the problem is the folders don't have read access for guest so linux isn't giving permission.

I've tried running chmod 644 /media/MOVIES/Movies, there aren't any errors but it doesn't do anything. I've tried
sudo nautilus

and then browsing to the folder's properties and tried to tick read access for others but as soon as i do the tick disappears!

i can't find any way to change the folder permissons.
can anyone help me?
 
I'm not really an expert and it's a while since I configured my Samba share but I have
Code:
guest ok =yes
in my smb.conf under the appropriate share.
 
What are the existing permissions on the /media/MOVIES/Movies folder? Is there global read access to /media/MOVIES - try chmod 644 on it too if not.

I'm getting confused with the switching between using VIDEOS and MOVIES to refer to (I think) the same share, hope Samba isn't! :p
 
rudeboymcc said:
k turns out it doesn't work. Dunno why i thought it did but the shared directory at *** moment is not accessible by the guest. the problem is the folders don't have read access for guest so linux isn't giving permission.

I've tried running chmod 644 /media/MOVIES/Movies, there aren't any errors but it doesn't do anything. I've tried
sudo nautilus

and then browsing to the folder's properties and tried to tick read access for others but as soon as i do the tick disappears!

i can't find any way to change the folder permissons.
can anyone help me?

What group is the folder? It could well be in a group which forbids guest access, but I admit I've never really tried playing with the more advanced features of groups. At a guess, try changing the group to michali :)

-Leezer-
 
Back
Top Bottom