LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba shares permissions issue (https://www.linuxquestions.org/questions/linux-software-2/samba-shares-permissions-issue-55636/)

jamespetts 04-18-2003 02:21 AM

Samba shares permissions issue
 
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

James E. Petts

sticker_lore 04-18-2003 02:59 AM

make sure you spell "writeable" correct.

jamespetts 04-18-2003 03:10 AM

Dictionary.com has it down as a valid word:

http://dictionary.reference.com/search?q=writable

sticker_lore 04-18-2003 03:19 AM

my my...someone needs to get a lesson in spelling! ;)

btw...did that fix the prob?

jamespetts 04-18-2003 03:34 AM

But my spelling was fine, as dictoinary.com confirmed, and the old spelling worked fine under 8.2. Why should changing the spelling help?

jamespetts 04-18-2003 04:00 AM

In any case, I just tried changing "writable" to "writeable",a nd it still did not work.

ninja 04-18-2003 06:37 AM

I think your configuration file is ok. Give adequate permission to the directory you want to share.

try to give it a 777 permission first.

jamespetts 04-18-2003 06:49 AM

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.

gauge73 04-18-2003 09:16 AM

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. ;)

jamespetts 04-18-2003 09:26 AM

Hmm, that's odd. I used a backed-up version of my previous smbusers and smbpassword files, so that hasn't changed.

What I find bizarre is that all the settings are identical to what they were under Mandrake 8.2 and yet under 9.1 it doesn't work.

Did they change something in Samba?

mychl 04-18-2003 09:37 AM

Find out what version of samba you had in 8.2, find out what version of samba you have in 9.1, then read the CHANGES file to find out.

Also, try creating a new smbpasswd file that uses the smbpasswd that comes with your current version of samba.....

gauge73 04-18-2003 11:53 AM

And make sure that your each smbuser has a matching entry in Mandrake's passwd file. Every Samba user must also have a username for Linux.

jamespetts 04-18-2003 11:54 AM

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.

mychl 04-18-2003 11:57 AM

well, are the permissions on the 3 directries that have the problem the same as the permissions on the other directories?

jamespetts 04-18-2003 12:13 PM

Excuse my newbiness in this question, but how does one go about checking? :-)


All times are GMT -5. The time now is 04:07 AM.