Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have just installed Mandrake 9.1 (clean) on a machine that used to run Mandrake 8.2 . I have three hard drives; the main one (ext3), which I reformatted and erased when I upgraded, a backup drive (ext3), for backups for the whole home network, and a little spare drive (FAT32) that's there just because it can be.
I share all of those drives through Samba to the other machines on the network, which all run Windows. The backup drive is supposed to take backups from all of the other machines, and I had it working doing this under 8.2.
I restored the same smb.conf file that I had backed up on the backup drive to share the drives. Now, they all appear shared but I cannot write to the backup drive from the Windows machines because it claims that the permissions are not set to it. It can read it just fine. I have set read only to "no" and "writable" to "yes", exactly as I had it before.
Has something changed in Samba to mean that I have to have a different setting to write to drives? I have no problem writing to the "spare" drive (FAT32) from the Windows machines, nor do I have problems writing to the backup drive from the Linux machine.
I reproduce my smb.conf below for information. Thank you in advance for any help :-)
# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2002/01/27 18:37:11
# Global parameters
[global]
workgroup = PETTS
netbios name = BEDROOM
server string = Backup server (Linux) running Samba %v
client code page = 850
character set = ISO8859-1
security = user
encrypt passwords = Yes
map to guest = Bad User
password level = 12
log file = /var/log/samba/log.%m
smb password file = /etc/samba/smbpasswd
os level = 5
max log size = 150
create mode = 0775
large readwrite = Yes
announce version = 5
announce as = NT Workstation
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = lpstat
os level = 5
lm announce = False
preferred master = False
local master = No
domain master = False
dns proxy = No
guest account = ftp
hosts allow = 192.168.0.
printing = cups
# wins server = 192.168.0.
# message command = /usr/local/bin/linpopup "%f" "%m" %s; rm %s
message command = sh -c 'export DISPLAY=:0; /usr/local/kde/bin/kpopup %s %f;' &
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
browseable = yes
[Backup]
comment = Backup files
path = /mnt/backup
read only = No
guest ok = Yes
fstype = Ext3
browseable = yes
writable = yes
[Spare]
comment = Spare Storage
path = /mnt/spare
read only = No
guest ok = Yes
fstype = FAT32
browseable = yes
writable = yes
[Upstairs]
comment = Main HDD upstairs
path = /
read only = yes
guest ok = Yes
fstype = Ext3
browseable = yes
writable = no
[UpstairsCD]
comment = CD-ROM drive
path = /mnt/cdrom
read only = yes
guest ok = Yes
fstype = CDFS
browseable = yes
writable = no
I wanted to share the whole drive. Are permissions not set on the filesystem itself? This drive has not changed at all since I reinstalled Linux; I reformatted the other drive.
And I have write access to the drive as a local non-root user with the same username and password as on the Windows machines. I don't see how a chmod would deal with that.
There are several parts of permissions when sharing files on a Linux box via Samba. Make sure that you have all of following:
1) Valid username/password in Linux
2) File permissions in Linux
3) Valid username/password in smbpasswd that match at least the username in Linux (I think the passwords can be different)
4) Permissions in smb.conf
Your smb.conf looks okay to me (but I just glanced at it, really). I would assume that your guest account exists in Linux's passwd file. Did you forget to add it to smbpasswd?
If not, try making a test account. Make sure that it is valid in all the steps above. Then explicitly add that test account to all the shares with the following line:
valid users = test_account
Also, you don't need the read only = no and writeable = yes. They are synonymous, and therefore, it is redundant.
I have now found that the problem applies only to the three existing directories on that drive and all of their subfolders; I can create and delete new directories fine.
Does this narrow it down at all? I still haven't found out how to fix it. Is this a chmod thing? I'm not all that experienced with Linux, so I'd appreciate help with that. Thank you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.