Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
writing to samba shares from win
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
wokno the sane
n00b
n00b


Joined: 18 Dec 2002
Posts: 20

PostPosted: Fri Dec 20, 2002 4:33 pm    Post subject: writing to samba shares from win Reply with quote

I have several partitions i am trying to share with my windows PC's. The windows PC's can see the shares, and the files in them, but can't write/delete to them. I am allowing all to connect as guest (it's a home network so not really concerned about per user security), and the shares are supposedly configured for write access in smb.conf. The partitions are all mounted in /mnt, but have permissions 751. if i try to chmod the mount points, the change does not show up (permissions still 751). I can chmod the mount points when the partitions are unmounted, but when they are remounted, the permissions again stay at 751. I'm not sure if it matters, but these partitons are all formated fat32 (for win XP dual boot).
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Thu Dec 26, 2002 8:41 am    Post subject: Reply with quote

It certainly does matter. FAT filesystems don't support security! And even if they did, they wouldn't support Unix type permissions ...

But you can mount a FAT filesystem with arbitrary security permissions (permissions as far as your Unix system is concerned) which will be applied to every file and directory on the partition, which should solve your problem. When I say applied, I don't mean it will actually change anything on the FAT partition (it won't), it just mocks up security permissions globally for the whole thing. Example: you have the usernames of your user accounts which need acccess in a group called lanusers. Mount your partition something like this:
Code:
mount -t vfat /dev/hda5 /mnt/xppart -o uid=root,gid=lanusers,dmask=775,fmask=664

In your Samba share definition make sure you have something like:
Code:

[sharename]
  path = /mnt/xppart
  valid users = root @lanusers
  force user = root
  force group = lanusers
  read only = no
  create mask = 664
  directory mask = 775

I think that should solve the problem.

If you were sharing files from a native filesystem, a lot of those Samba parameters would become absolutely crucial, otherwise you'd end up with files being created by individual users only readable by themselves (as opposed to the parent inheritance mechanism used by default in Windows).
Back to top
View user's profile Send private message
wokno the sane
n00b
n00b


Joined: 18 Dec 2002
Posts: 20

PostPosted: Thu Dec 26, 2002 1:46 pm    Post subject: Reply with quote

I have already found the answer, and thought I posted back here with it, but I guess I didn't. That's not exactly what I did to get it working. I added umask=000 to my fstab and it works great. The approach sugested above would be better for people more concerned with security though. Thanks for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum