Discussion Locked

Samba won't write to VFAT??

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have finally narrowed my problem down. I am trying to share a directory "/d" to my Windows machines. This works great if the data inside is a linux-native filesystem. When I use samba to share out a directory on my linux box that happens to be VFAT i can access the files on the windows machines just fine, but can't write to them. Does anyone know a workaround for this? I suppose I could just backup the data and reformat the data drive in ex2fs, but I would like to know in case I need to do some windows recovery in the future. Thanks a bunch

craigmjackson@yahoo.com

3 replies

by paulo.sedrez

Samba will write on any filesystem if it has write access to it.

Be carefull, however, tha samba will change the EUID (effective user ID) of it own process to that of the user, so you will problably not be able to write to VFAT if it was mounted as root.

Two solutions:

1) add, to the share on Samba configuration, the attribute "force user = root", to became root on that share;

or

2) add, to the mount command (or in the fstab, see man pages) the option "umask=0", so all users have read and write permissions to the partition; e.g.

"mount -t vfat -o umask=0 /dev/hda /dos"

I use the second option at home.

Hope this helps.

--Sedrez

by the epitome

Thank you, I can see why this security is in place, reminds me of another example of the "no suid" type movement. Thanks for the detailed explanation.

This discussion is closed to new replies.