Computing.Net > Forums > Linux > Samba Problems with RW unless root

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Samba Problems with RW unless root

Reply to Message Icon

Name: jimay3672
Date: February 10, 2005 at 16:15:39 Pacific
OS: Xandros 3.0/MDK10.1
CPU/Ram: A2.8,512/Via1,256
Comment:

Hi, I hope someone can help.
I've setup a simple samba server to share two folders /home/username/, one for me and one for my GF.
I've managed to get it all setup and working fine from windows, I can log into my share, read and write etc but not my GF's and vice versa.
The problem is when I mount the share in Xandros
For someone reason the share mounts fine but I only have RW access to the root folder, I can delete any file or folder there, but if I create a folder, then try to create something inside that folder I can't as the permissions won't allow it, however if browse the share as root I have full access.., what gives??

I've running Xandros 3.0 as my client and Mandrake 10.1 as the Samba server.

I have the same username and password setup on both Xandros and Samba, and like I said I have no problems with RW from windows, just Linux.

Any help would be greatly appreciated as I'm considering setting up a win2k server instead. which I would rather not do.



Sponsored Link
Ads by Google

Response Number 1
Name: virgo20s
Date: February 10, 2005 at 20:42:04 Pacific
Reply:

Its look like you have Problem with Samba configuration. in configuration you have option to set folder mask which set the permessions on the new file or folder, just like the "umask". your configuration may setting the permession on new File or Folder to 'read only'. check them or send me your configuration file. so I could see where the problem is. or mail me to send you a configured file for your setting.


0

Response Number 2
Name: jimay3672
Date: February 11, 2005 at 03:04:19 Pacific
Reply:

here's my server smb.conf

[global]
workgroup = CYBERTRON
netbios name = TELETRAN3
encrypt passwords = yes
security = user
os level = 65
preferred master = yes
local master = yes

[james]
path = /home/james/
browseable = yes
public = yes
write list = james
writeable = yes
preserve permissions = yes

Like I said I can read and write from winXP, or as root on the Linux client, but if I use a normal user I can create files and folders in the root of the share but if I try to create something in one of the folders I have no access to do so (unless browsing as root)

I should meantion /home is a seperate partition on the samba server, it's an XFS partition and the permissions are set to 757 owner is james (same as user trying to access)

This is driving me insane, any help is greatly appreaciated!

I've set file mask to 777 in the samba config file and even that made no difference, I can't think of anything else to try :(

Except to ditch Samba and install w2k3 which I REALLY don't want to do.

Thanks.


0

Response Number 3
Name: 3Dave
Date: February 11, 2005 at 03:37:05 Pacific
Reply:

"...I've set file mask to 777 in the samba config file..."
Hmmm....I can't see it in the smb.conf you posted above. Make sure that you have something like the following in there:
create mask = 0664
directory mask = 0775

That should give read/write access to the owner and group and read access for everyone else. Just make sure that your girlfriend is a member of the correct group.


0

Response Number 4
Name: jimay3672
Date: February 11, 2005 at 04:05:12 Pacific
Reply:

What I mean was, I HAD set the file mask etc etc in the samba config file, but removed as it had no effect.


0

Response Number 5
Name: jimay3672
Date: February 11, 2005 at 04:14:12 Pacific
Reply:

the thing is I DO have FULL rw access to the share, and CAN write stuff, and delete files I create, but if I create a folder, I can delete it, but the permissions the THAT folder won't let me put anything in, even with file mask set in the samba config file, it's as if the XFS filesystem on the server is overiding the samba permissions. However that makes no sense as the file permissions the actual folder on the server are different to how the share comes up on the Linux client, plus I can do anything I want to the share on windows.


0

Related Posts

See More



Response Number 6
Name: jimay3672
Date: February 11, 2005 at 04:31:39 Pacific
Reply:

Here's the client smb.conf if that makes any different, I have mounted the share with LinNieghborhood and set file mask to, 757, 777.. No Luck

[global]
workgroup=CYBERTRON
server string=%h server (Samba %v)
dns proxy=no
security=user
encrypt passwords=true
preserve case=yes
case sensitive=no
os level=20


0

Response Number 7
Name: jimay3672
Date: February 11, 2005 at 04:33:17 Pacific
Reply:

sorry, that's the client config


0

Response Number 8
Name: jimay3672
Date: February 11, 2005 at 04:55:00 Pacific
Reply:

FIXED woohoo!!!!

inherit permissions = yes
rather than
'preserve' premissions=yes

Thanks anyway guys!!!

anything I should change to be more secure?
[global]
workgroup = CYBERTRON
netbios name = TELETRAN3
encrypt passwords = yes
security = user
os level = 65
preferred master = yes
local master = yes

[james]
path = /home/james/
browseable = yes
public = yes ??
write list = james
writeable = yes
inherit permissions = yes


0

Response Number 9
Name: jimay3672
Date: February 11, 2005 at 04:59:02 Pacific
Reply:

it's NOT fixed!!!

argh!!!

*sigh* time to install w2k3


0

Response Number 10
Name: 3Dave
Date: February 11, 2005 at 06:33:12 Pacific
Reply:

If it helps here's the smb.conf from one of my servers. Make sure you have both create and directory masks:

[global]
workgroup = SWCC
server string = Samba Server
netbios name = FileAndPrint
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192

os level = 64
preferred master = yes
local master = yes
domain master = yes
wins support = yes

security = user
encrypt passwords = yes
domain logons = yes
log file = /var/log/samba/%m.log
log level = 2
max log size = 50
syslog = 1
# hosts allow = 127.0.0.1 192.168.0.0/255.255.255.0
create mask = 0664
directory mask = 0775

#domain admin users = root

logon script = logon.bat
logon path = \\%L\profiles\%U
logon drive = H:

add machine script = /usr/sbin/useradd -d /dev/null -g machines -s /bin/false u%

unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *Retype*new*UNIX*password* %n\n *Enter*new*UNIX*password* %n\n *Retype*new*UNIX*password* %n\n *passwd: *all*authentication*tokens*updated*successfully*
smb passwd file = /etc/samba/private/smbpasswd

#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes

[profiles]
path = /mnt/data/profiles
writable = yes
browseable = yes
public = no

[netlogon]
comment = Network Logon Service
path = /home/samba/netlogon
read only = yes

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
guest ok = yes
writable = yes
printable = yes

[public]
comment = Public Stuff
path = /mnt/data/public
public = yes
writable = yes
printable = no
create mask = 0664
directory mask = 0775

[users]
comment = User Folders
path = /mnt/data/users
public = no
writable = yes
printable = no
create mask = 0664
directory mask = 0775

[ftp]
comment = User Folders
path = /mnt/data/ftp
public = no
writable = yes
printable = no
create mask = 0664
directory mask = 0775

[accounts]
comment = Accounts
path = /mnt/data/accounts
public = no
writable = yes
printable = no
create mask = 0664
directory mask = 0775
write list = robincarr

[line50]
comment = Accounts
path = /mnt/data/accounts/Line50
public = no
writable = yes
printable = no
create mask = 0664
directory mask = 0775
write list = robincarr

[holidays]
path = /mnt/data/holidays
public = no
public = no
writable = yes
printable = no
create mask = 0644
directory mask = 0755

[root]
comment = Filesystem root
path = /
writeable = no


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Samba Problems with RW unless root

NIS problem with non-root user www.computing.net/answers/linux/nis-problem-with-nonroot-user/14927.html

MAKE problems with Samba 2.2.7 www.computing.net/answers/linux/make-problems-with-samba-227/16591.html

Big problem with R.H. versions www.computing.net/answers/linux/big-problem-with-rh-versions/16022.html