Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba & Permissions on XP Share from Ubuntu

Status
Not open for further replies.

dbdoveman

Programmer
Feb 16, 2009
2
US
I set up a private server on our lan running Ubuntu 8.04 server edition.
I need to be able to write to the apache clients drive so I set up samba and mounted a shared directory on an XP system. The shared directory is accessed with the sharename 'clientdata'. It is owned by a user name 'fhuser' on the XP system. I have given full r/w rights to everyone.
The mount point on the linux server is '/var/ It is owned by a user name 'fhuser' on the server. 'client' is setup with 777 permissions.

I mount the share with the following:
mount -t cifs -o username=fhuser //192.168.2.91/clientdata /var/Password for both fhusers is null.

Before the mount the client's ls -al looks like:
drwxrw-rw- 2 fhuser fhuser 4096 2009-02-08 15:18 client
After the mount it looks like this:
drwxrwxrwx 1 root root 0 2009-02-13 14:01 client

I am assuming that the user fhuser is failing and ownship is reverting to root but I don't know why.

The smb config looks like this:
# Global prameters
[global]
workgroup = HARDWARE
Netbios name = fhscserver
null passwords = yes
; encrypt passwords = Yes
; this tells Samba that security level must be set to user
; security = user
[everyone]
path = /var/write list = Guest, fhuser, F&H
browseable = yes
read only = no
create mask = 0755
directory mask =0755
invalid users = fhuser

When I write a file to 'client' through apache it will create the file and write the first record but all subsequent access's fail. Looking at the file on the share is has permissions of 600. If instead of writing it through the apache user I simply touch a file on 'client' it is created with a permission of 633. In both case the owner is root.

I have been fighting this for days. If you have any idea what I have done wrong please help. I am desperate to get this server up.

Thanks

DonB
 
Why do you have fhuser listed as an invalid user?

You might do a search regarding setting ownership rights on an NTFS share. Part of this problem may be because this is an NTFS (or FAT?)share on a Windows system?

 
Thanks for the reply.
The fhuser was set as invalid user to see if that would override the owner being set to root when the mount took place. It didn't work but I forgot to set it back to root.

As far as the ntfs security rules go they are different on XP Home vs w2k. So I tested this with w2k and the result is exactly the same. On w2k I made sure that the user fhuser had full r/w permissions. I also tried creating a user called root and gave it full r/w on the w2k system. Again when the file was created it was only given 600 permissions and the owner was root. Apache runs as fhuser. Why does mount change the owner.group from fhuser.fhuser to root.root? It returns to fhuser.fhuser when unmounted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top