Click to See Complete Forum and Search --> : Samba and the file rights.....


Dennizlerim
09-11-2003, 01:53 PM
I've got samba running on a SuSE 8.1 and connect to it via my laptop running SuSE 8.2(both running ReiserFS partitions)

I can access the share and mount it to the system as root user, but I pass a normal user as an option.
The share mounts and I can read without a problem, but I can't create new files on the system.

I've checked the settings on the machine and there are full rights (rwxrwxrwx) on all files and directories.
If I check them on the share all files are owned by root and I get the following rights : rwxr-x-r-x

Is there anything that I forgot or pass on the smbmount to get this working??

Dennis

stumbles
09-11-2003, 02:08 PM
Originally posted by Dennizlerim

I've checked the settings on the machine and there are full rights (rwxrwxrwx) on all files and directories.
If I check them on the share all files are owned by root and I get the following rights : rwxr-x-r-x

Is there anything that I forgot or pass on the smbmount to get this working??

Dennis

Unless I'm mistaken in the smb.conf there is a section for adding user shares and specifing if they are read only. You might want to look there.

Dennizlerim
09-11-2003, 02:12 PM
Originally posted by stumbles
Unless I'm mistaken in the smb.conf there is a section for adding user shares and specifing if they are read only. You might want to look there.

I know, but the smb.conf marks it as writeable.....
The sad thing is that if I mount it with a Win2k machine it works fine.

Modorf
09-11-2003, 02:25 PM
WHy not use NFS, that is easier to work with.

Dennizlerim
09-11-2003, 02:31 PM
Originally posted by Modorf
WHy not use NFS, that is easier to work with.


I will probably install that tommorow, but actually this is not really a satisfying solution.

I like Linux, because I have the chance to understand why my PC does, what it does...... switching protocol will bring me back to a windooz type of reaction

Hayl
09-11-2003, 02:39 PM
Originally posted by Modorf
WHy not use NFS, that is easier to work with.

possibly because it is far less secure than SMB and not nateively interoperable with windows machines. neither linux nor windows boxes have to run anything special to attach to a samba server.

regarding security: specifically, its use of UDP - which is inherantly secure because it can be spoofed easily.

in the "Real World Linux Security" book by Bob Toxen, NFS's danger level is rated as 5 skulls - SAMBA is only rated as 4 skulls.

Hayl
09-11-2003, 02:41 PM
post the section of your smb.conf file that has the share tha is not working properly.

also - include what user names are trying to access it.

Dennizlerim
09-11-2003, 02:54 PM
Originally posted by Hayl
post the section of your smb.conf file that has the share tha is not working properly.

also - include what user names are trying to access it.

I'm not on the server anymore... damn time lack :p

Anyway, I'll try this out of my mind, should work.....

------------
[html]

path = /.../htdocs
writeable = yes
directory mask = 0777
------------

ls -l on the server will give you something like....:

drwxrwxrwx dennis users .
drwxrwxrwx dennis users ..
-rwxrwxrwx dennis users *******

If I mount it using mount -t smbfs -o username=dennis //IP/html /network/html

I get the following listing
drwxr-xr-x root root .
drwxr-xr-x root root ..
-rwxr-xr-x root root *******

Editing files mostly works... its just the creating which really gets me

Can I change that be changing something in the fstab???

cowanrl
09-11-2003, 08:02 PM
If you are running smbmount as root, there are options you need to use with the command so non-root users can write to the shares you mount.
There is also a way to modify smbmnt(not smbmount) so that non-root users can execute smbmount and mount shares themselves and have write access to them.

Look in the Library on this site under File Systems. There is an article titled Mounting smbfs Shares Permanentaly that explains it all.

Dennizlerim
09-12-2003, 08:00 AM
I changed some setting and it looks good now.

It did not work the way, I thought it would, but now I can do what I want.

So here we go:

I mount my share using the following command:

mount -t smbfs -o username=dennis,uid=dennis,gid=users //IP/share /mountpoint

where username and uid is the user on the remote system ( I hope I understood that right, as the user has the same name on both PCs...) and gid the group....

now it still shows me the listing with the wrong rights, but thats ok, because my user is owner of the files now.

Listing looks like this now:

drwxr-xr-x dennis users .
drwxrwxrwx dennis users ..
-rwxr-xr-x dennis users ****

Thanks for all the infos....