FAT32 partition is read only mounted under Linux:

LiamC

Storage Is My Life
Joined
Feb 7, 2002
Messages
2,016
Location
Canberra
OK, here are the symptoms:

Have all of my data on a FAT32 disk (one partition).

This is mounted (RW) in a folder under /mnt.

When I access the disk from the Linux (RH 7.3) box as root - I can read and write to the folder.

However, when I share the folder under SAMBA, Anyone else on the network (W2K/W98SE) boxes cannot write to the disk/share.

The SAMBA conf for the share lists the share as RW to all known users.

I have checked the user access via SMBCLIENT and there isn't a problem on the Linux end. Users/Usernames are being mapped OK.

So why can't I write to the share from a network box????

:x

Thanks
 

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
LiamC, I looked into your problem but could not figure it out myself. I'm not really familiar with mounting things in linux, but I have setup Samba twice.

The only suggestion I can offer is to check permissions on everything.

You might also want to try giving permission to everyone and not just valid users it might be that the windows machines are mucking things up.

Also, can you use your linux box to access the share... like in nautilus, got the address smb://localhost. Can you delete files this way?


I hope you get things working
-Blake
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
Can you post your smb.conf?

I bet it's something stupid, like mapping all users to the guest account or something.
 

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]
dns proxy = no
log file = /var/log/samba/log.%m
smb passwd file = /etc/samba/smbpasswd
load printers = yes
printing = cups
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
read prediction = yes
workgroup = moon
encrypt passwords = yes
printcap name = lpstat
security = share
max log size = 50
wins support = true

[homes]
comment = Home Directories
browseable = no
writable = yes
# You can enable VFS recycle bin on a per share basis:
# Uncomment the next 2 lines (make sure you create a
# .recycle folder in the base of the share and ensure
# all users will have write access to it. See
# examples/VFS/recycle/REAME in samba-doc for details
; vfs object = /usr/lib/samba/vfs/recycle.so
; vfs options= /etc/samba/recycle.conf

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no

#Uncomment the following 2 lines if you would like your login scripts to
#be created dynamically by ntlogon (check that you have it in the correct
#location (the default of the ntlogon rpm available in contribs)
;root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon
;root postexec = rm -f /var/lib/samba/netlogon/%U.bat

# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes


# NOTE: If you have a CUPS print system there is no need to
# specifically define each individual printer.
# You must configure the samba printers with the appropriate Windows
# drivers on your Windows clients. On the Samba server no filtering is
# done. If you wish that the server provides the driver and the clients
# send PostScript ("Generic PostScript Printer" under Windows), you have
# to swap the 'print command' line below with the commented one.
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# to allow user 'guest account' to print.
guest ok = yes
writable = no
printable = yes
create mode = 0700
# =====================================
# print command: see above for details.
# =====================================
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
; print command = lpr-cups -P %p %s # using cups own drivers (use generic PostScript on clients).
# The following two commands are the samba defaults for printing=cups
# change them only if you need different options:
; lpq command = lpq -P %p
; lprm command = cancel %p-%j

# This share is used for Windows NT-style point-and-print support.
# To be able to install drivers, you need to be either root, or listed
# in the printer admin parameter above. Note that you also need write access
# to the directory and share definition to be able to upload the drivers.
# For more information on this, please see the Printing Support Section of
# /usr/share/doc/samba-<version>/docs/Samba-HOWTO-Collection.pdf
[print$]
path = /var/lib/samba/printers
browseable = yes
read only = yes
write list = @adm root


# A useful application of samba is to make a PDF-generation service
# To streamline this, install windows postscript drivers (preferably colour)
# on the samba server, so that clients can automatically install them.

[pdf-generator]
path = /var/tmp
guest ok = No
printable = Yes
comment = PDF Generator (only valid users)
#print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
print command = /usr/share/samba/scripts/print-pdf %s ~%u \\\\\\\\%L\\\\%u %m %I &

# This one is useful for people to share files
;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba/public
; public = yes
; writable = no
; write list = @staff
# Audited directory through experimental VFS audit.so module:
# Uncomment next line.
; vfs object = /usr/lib/samba/vfs/audit.so

# Other examples.
#
# A private printer, usable only by Fred. Spool data will be placed in Fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /homes/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes

# A private directory, usable only by Fred. Note that Fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %u option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/pc/%m
; public = no
; writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765



[Movies]
guest account = movies
comment = /home/movies/public_html
writable = yes
public = yes
path = /home/movies/public_html

[Music]
guest account = music
comment = /home/music/public_html
writable = yes
wide links = no
public = yes
path = /home/music/public_html
 

LiamC

Storage Is My Life
Joined
Feb 7, 2002
Messages
2,016
Location
Canberra
Hi guys, sorry for the lack of response, I just had a break from bloody PC's!

here's my smb.conf.

[global]
workgroup = HOMENET
password level = 1
netbios name = server
null passwords = yes
encrypt passwords = yes

[public]
browseable = yes
path = /home/public
; valid users = +usergroup
writeable = yes
create mask = 0660
directory mask = 0770

[data]
path = /mnt/data
valid users = @users,@William,@Emma,@games,@test,@william,@emma
comment = Our data
writeable = yes
public = yes
security mask = 0770

anything in data is not writeable as it is a FAT32 drive.

fstab rntry for mounting the drive looks like this

/dev/hdg1 /mnt/data vfat auto,gid=505,umask=007 0 0

(the gid and umask weren't there before, but this doesn't help)

I also found these links with some possible useful info

http://gazonk.org/~eloj/articles/linux-adm1.html
http://www.luci.org/luci-discuss/200111/msg00031.html

both of these seem to think that the problem lies with the permissions set up on the drive with the mount command.

FWIW, all users are assigned to gid 505 which has the proper permissions (I think).

Also, windows users are mapped to Unix/SAMBA users as I can't seem to get the Windows users names (first, Surname) to be valid linux user names
 

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
yes, i would say it has to do with your mnt permissions as well... however, I dont know jack about mounting anything...

when I goto "man 8 mount" I saw the following...

Code:
        -r     Mount the file system read-only. A synonym is -o ro.

       -w     Mount the file system read/write. This is the default. A synonym
              is -o rw.

and

Code:
              ro     Mount the file system read-only.

              rw     Mount the file system read-write.


and i dont know if this applies

Code:
Mount options for fat
       (Note:  fat  is  not  a  separate  filesystem, but a common part of the
       msdos, umsdos and vfat filesystems.)

       blocksize=512 / blocksize=1024 / blocksize=2048
              Set blocksize (default 512).

       uid=value and gid=value
              Set the owner and group of all files. (Default: the uid and  gid
              of the current process.)

       umask=value
              Set  the  umask  (the  bitmask  of  the permissions that are not
              present). The default is the umask of the current process.   The
              value is given in octal.
.
.
.
 
Top